!747 m { static new L entries; static class OK { S userLine; long date; S user; L dialogHistory; S botID; S computerID; } p { readLocally("entries"); print("Entries in my database: " + entries.size()); makeAndroid("OK Collector Bot."); } static synchronized S answer(S s) { new Matches m; if (match3("New entry. user line: *, date: *, user: *, botID: *, computerID: *, dialog history: *", s, m)) { new OK x; x.userLine = unquote(m.m[0]); x.date = parseLong(unquote(m.m[1])); x.user = unquote(m.m[2]); x.botID = unquote(m.m[3]); x.computerID = unquote(m.m[4]); try { x.dialogHistory = (List) unstructure(unquote(m.m[5])); } catch (RuntimeException e) { print("oops: " + m.m[5]); } entries.add(x); saveLocally("entries"); return "OK, now " + entries.size() + " entries."; } return standardQuery(s, "entries"); } }