diff --git a/bot.zip b/bot.zip new file mode 100644 index 0000000..cd9cf41 Binary files /dev/null and b/bot.zip differ diff --git a/bot/bot/Bot.cs b/bot/bot/Bot.cs index 89a5103..3785203 100644 --- a/bot/bot/Bot.cs +++ b/bot/bot/Bot.cs @@ -128,7 +128,7 @@ namespace bot { loadResponseList(); Console.WriteLine("OK"); - Console.Write("Loading autonomous routine list ..."); + Console.Write("Loading autonomous routine list ... "); loadAutonomousList(); Console.WriteLine("OK"); @@ -184,11 +184,17 @@ namespace bot { } Console.WriteLine("OK"); + Console.Write("Starting pulse thread ... "); _G.startThread(Pulse.pulseThread); + Console.WriteLine("OK"); + Console.Write("Preparing chat context ... "); Chat.reloadContext(_G.driver); + Console.WriteLine("OK"); - (new Thread(new ThreadStart(Bot.AutonomousThread))).Start(); + Console.Write("Starting autonomous thread ... "); + _G.startThread(Bot.AutonomousThread); + Console.WriteLine("OK"); Console.WriteLine(_G.propername + " has started successfully."); @@ -198,10 +204,10 @@ namespace bot { Message msg = Chat.waitForNewMessage(_G.driver); if(!ignoreResponses) { if(msg == null) break; - if(msg.msg == "!dump") { + /*if(msg.msg == "!dump") { foreach(Response r in responseList) Chat.sendMessage("IF " + r.condstr + " THEN " + r.responseType.Name); - } + }*/ if(msg.msg == "!update") { Bot.loadResponseList(); Chat.sendMessage("response list updated"); diff --git a/bot/bot/Pulse.cs b/bot/bot/Pulse.cs index 86e0f96..6a56dc2 100644 --- a/bot/bot/Pulse.cs +++ b/bot/bot/Pulse.cs @@ -23,7 +23,7 @@ namespace bot { Query.Quiet("UPDATE `updater` SET `responses`=0 WHERE `id`=1", _G.conn); } if(tmp[1]) { - // TODO implement update when autonomous is added + Bot.loadAutonomousList(); Query.Quiet("UPDATE `updater` SET `autonomous`=0 WHERE `id`=1", _G.conn); } if(tmp[2]) { diff --git a/www/auto.php b/www/auto.php index 894ae63..695534b 100644 --- a/www/auto.php +++ b/www/auto.php @@ -1,5 +1,7 @@ "; for($i = 0; $i <= 59; $i++) { + echo ""; echo ""; } ?>