static new ThreadLocal pivoMode; !include #1002953 // Point Bot static L matches = litlist( "Are you William?", "Oh sure I am!", "the my guy called a", "" ); static void pivoLoad() { loadPointBot(); } static synchronized S answer(S s) { new Matches m; if (!attn()) ret null; if (!eq(getUserName (), "stefanreich") && !pivoMode. get ()) ret null; try answer answerPointBot(s); for (int i = 0; i+2 < l(matches); i += 3) { S pat = matches.get(i); S words = matches.get(i+2); if (matchQuestion_dropping(pat, words, s)) ret matches.get(i+1); } // addition L tok = codeTokensOnly(javaTok(s)); if (l(tok) == 3 && eq(get(tok, 1), "+") && isInteger(get(tok, 0)) && isInteger(get(tok, 2))) ret str(bigint(get(tok, 0)).add(bigint(get(tok, 2)))); ret s; } static boolean matchQuestion_dropping(S pat, S wordsToDrop, S s) { ret match(pat, dropWords(s, wordsToDrop)); } static void log(S bot, S text) { logMap(logName, "time", now(), "bot", bot, "msg", text); }