static class ChatLine { long id, room; S who, text; boolean isBot, auth; } static long suckWebChatRoom_lastSuck; static L suckWebChatRoom(S myName, long room, long fromID, int n) { if (now() < suckWebChatRoom_lastSuck + 500) print("Warning: Sucking a lot :)"); suckWebChatRoom_lastSuck = now(); Map data = (Map) jsonDecode(loadPageSilently("tinybrain.de:8080/tb-int/groupchat.json.lines.php?room=" + room + "&fromID=" + fromID + "&n=" + n + "&who=" + urlencode(myName))); L> lines = (L) data.get("lines"); new L list; for (Map m : lines) { new ChatLine l; l.who = m.get("who"); l.text = m.get("text"); l.isBot = "1".equals(m.get("bot")); l.auth = eq(m.get("auth"), "1"); l.id = parseLong(m.get("id")); l.room = room; list.add(l); } ret list; }