!1001816 // a custom translator m { static new MultiSet hitsByIP; p { readLocally("hitsByIP"); makeBot("Hit Log."); } static synchronized S answer(S s) { new Matches m; if (match3("note! a hit from ip *", s, m)) { hitsByIP.add(m.unq(0)); saveLocally("hitsByIP"); ret "OK, noted."; } if (match3("get hits from ip *", s, m)) ret "" + hitsByIP.get(m.unq(0)); ret null; } }