!747 m { static new L rebootLog; p { readLocally("rebootLog"); makeAndroid("Reboot Bot."); } static synchronized S answer(S s) { if (match3("Please reboot the machine.", s)) { final S cmd = isWindows() ? "shutdown -t 5 -r" : "reboot"; print(cmd); S answer = "Rebooting in 5 seconds!"; print(answer); rebootLog.add(now()); saveLocally("rebootLog"); thread { sleepSeconds(5); backtick(cmd); } return answer; } if (match3("How many reboots have you done?", s)) return "" + rebootLog.size(); return null; } }