// > hm{"date"=1532956452412L, "mode"="bot append", "id"=392L, "text"="lhm{\"where\"=-1001255041751L, \"type\"=\"heard\", \"date\"=\"2018/07/30 15:14:44'0372\", \"originalDate\"=1532956483, \"text\"=\"are you nasty\", \"userID\"=604039341, \"userFirstName\"=\"Stefan\", \"userLastName\"=\"Reich\"}\nlhm{\"action\"=\"send\", \"text\"=\"Certainly not as nasty as you.\", \"date\"=\"2018/07/30 15:14:44'0948\", \"type\"=\"sent\"}"} static WebSocketClient listenForAppendsToRemoteMechList(S listName, final VF1 onAppend) { final long listID = getRemoteMechListID(listName); if (listID == 0) ret null with print("List not found: " + listName); final LineBuffer buf = new(voidfunc(S s) { pcall { Map map = safeUnstructMap(s); if (eqGet(map, 'mode, "bot append") && eqGet(map, 'id, listID)) callF(onAppend, getString(map, 'text)); } }); ret webSocketOnMessage_withIdler(webSocketButterBot(#1015684), voidfunc(S s) { new Matches m; if (startsWith(s, "+", m)) buf.append(m.rest()); }, 10.0, "look back 0 chars pw *", muricaPassword()); }