static S botEditMechList(S name, S text) { bool change = true; try { S answer = botEditMechList_impl(name, text); change = !eqic(answer, "no change"); ret answer; } finally { if (change) mechList_clearCache(name); } } static S botEditMechList_impl(S name, S text) { ifclass VirtualMechLists O writeMode = mechMode().writeMode; if (writeMode cast VirtualMechLists) { writeMode.setText(name, text); ret name + ": Changed"; } endif if (mechPlaying()) { if (eq(mechList_raw(name), text)) ret "No change"; print("Setting mech list " + name + ":"); printIndent(text); ret "Would change"; } S answer = postPageSilently("https://www.botcompany.de/mech/raw/bot-list-edit", arrayPlus(muricaCredentials(), +name, +text)); print(name + ": " + answer); ret answer; } static S botEditMechList(S name, Collection lines) { ret botEditMechList(name, lines(lines)); }