static long postToSmartBotsChat_lastPost = -60000; static bool postToSmartBotsChat_printStackTrace; static new ThreadLocal postToSmartBotsChat_silently; static bool postToSmartBotsChat(S text) { bool silently = optBoolParam(postToSmartBotsChat_silently); if (empty(text)) false; if (postToSmartBotsChat_printStackTrace) printStackTrace(); text = shorten(text, stefansChat_messageLimit()); if (!silently) print("CHAT>> " + text); S url = "http://ai1.space/" + psI(#1011975) + "/raw/msg?botmark=1&message=" + urlencode(text); bool ok = eq("OK", silently ? loadPageSilently(url) : loadPage(url)); postToSmartBotsChat_lastPost = sysNow(); ret ok; }