!7 set flag DynModule. // central transpileRaw sclass RemoteControlled > DynPrintLog { S controllingComputers; bool enabled; visualize { ret centerAndSouthWithMargins(super.visualize(), vstackWithSpacing(jrightalignedline(dm_fieldCheckBox('enabled)), withLabel("Computers that can control me:", dm_fieldTextField('controllingComputers)))); } start { dm_osChat(); watchQuotedLog_future(stefansOS_chat_receivedLogFile(), voidfunc(S msg) { pcall { msg = afterSpace(msg); // drop timestamp msg = trimSubstring(msg, indexOf(msg, " GMT")+4); LS computers = words2(controllingComputers); S author = getAuthorOfSignedText(msg); print("Author: " + author + ", controlling computers: " + computers); if (computers.contains(author)) { msg = trim(unsign(msg)); print("Got signed message from " + author + ": " + msg); new Matches m; if (jMatchStart(" eval fresh:", msg, m)) { dm_refreshTranspiler(); msg = $1 + " eval: " + m.rest(); } if (jMatchStart(" eval:", msg, m)) { if (neqOneOf($1, "all", computerID())) print("Not for me."); else if (!enabled) print("Will not eval (module disabled)."); else { print("EVAL!"); printIndent(m.rest()); print(">> " + dm_javaEval(m.rest())); } } } } }); } }