!7 !include once #1017126 // 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_requireModule("#1017119/OSChat"); watchQuotedLog_future(stefansOS_chat_receivedLogFile(), voidfunc(S msg) { pcall { S author = getAuthorOfSignedText(msg); if (words(controllingComputers).contains(author)) { msg = trim(unsign(msg)); print("Got signed message from " + author + ": " + msg); new Matches m; if (swic_trim(msg, "eval NOW.", msg)) javaEval(m.rest()); } } }); } }