!7
static S html() {
new StringBuilder buf;
buf.append("");
buf.append("
BotCompany Internal Bots");
buf.append("");
buf.append("");
buf.append("");
O mainBot = getMainBot();
L botsToList = litlist(getProgramID(mainBot));
O dispatcher = getDispatcher();
if (dispatcher != null)
botsToList.addAll((L) call(dispatcher, "getSubBotIDs"));
L activeBots = cast get(mainBot, "activeBots");
botsToList.addAll(activeBots);
for (S botID : botsToList) {
botID = formatSnippetID(botID);
S parsedID = "" + parseSnippetID(botID);
S title = "?";
pcall { title = getSnippetTitle_cached(botID); } // TODO: free cache occasionally
S name = botID + " - " + htmlencode(title);
buf.append("- " + name + " (");
buf.append("source)
");
}
buf.append("
");
buf.append("Hit count: " + getOpt(mainBot, "hitCount") + "
");
buf.append("Last interactions:
");
pcall {
int maxInteractionsToPrint = 10;
L