!752 static S name = "Bob"; static new L knownBots; static bool saidThatIAmABot; p { print("Bob Print Test, print_log=" + systemHashCode(print_log) + ", local_log=" + systemHashCode(local_log)); thread "Bob" { simpleChatListen(); simpleChatPresence(name); simpleChatPost("Hey yo, I'm " + name + "!"); simpleChatWait(); simpleChatPost("Any bots here?!"); } } static void process(L msgs) { for (O msg : msgs) { S text = getString(msg, "text"); S user = getString(msg, "user"); print(name + ": msg " + quote(text) + " " + quote(user)); if (eq(user, name)) continue; if (eqic(text, "I'm a bot") && !knownBots.contains(user)) { setAdd(knownBots, user); simpleChatPost("Cool. Hello " + user + "!" + (saidThatIAmABot ? "" : " I'm a bot too.")); //saidThatIAmABot = true; } if (eqic(text, "Any bots here?!") && !saidThatIAmABot) { simpleChatPost("I'm a bot"); //saidThatIAmABot = true; } } }