static S botAppendToMechList_mode(S name, S text, S mode) { if (empty(name) || empty(text)) ret ""; ifclass VirtualMechLists O writeMode = mechMode().writeMode; if (writeMode cast VirtualMechLists) { if (eq(mode, 'uniqCI)) text = lines(listMinusSet(tlft(text), asCISet(tlft(writeMode.mL_raw(name))))); if (empty(text)) ret "No change"; mech_notifyBusOfChange(name); print("Adding to mech list " + name + ":"); printIndent(text); writeMode.append(name, text); mechList_clearCache(name); ret name + ": Changed"; } endif S result = postPageSilently("http://butter.botcompany.de:8080/mech/raw/bot-list-append", arrayPlus(muricaCredentials(), +name, +text, +mode)); if (!swic(result, "No change")) { if (eq(mechMode().readMode, 'localCopies)) { print("Appending to local list copy: " + name); appendToLocalMechListCopy(name, text); } mech_notifyBusOfChange(name); mechList_clearCache(name); } //infoBox(name + ": " + result); ret result; } static S botAppendToMechList_mode(S name, Collection lines, S mode) { if (empty(lines)) ret ""; ret botAppendToMechList_mode(name, lines(lines), mode); }