!752 static class Msg { S user, text; *(S *user, S *text) {} *() {} } // persistent static PersistentLog msgs; // built every time in memory static new MultiMap msgsByUser; p { msgs = new PersistentLog("incoming-msgs"); for (Msg m : msgs) pcall { answer(m.text, m.user); } makeBot("I Have Bot."); } static S answer(S s) { ret answer(s, "user"); } static synchronized S answer(S s, S user) { msgs.add(new Msg(user, s)); new Matches m; ret answerImpl(user); msgsByUser.put(m.user, m); if (matchStart("i have", s, m)) { print(structure(m)); S rest = m.rest(); print("Rest: " + quote(rest)); ret "ok"; } }