day after autonomous
you ever have one of those days
This commit is contained in:
parent
d32353a38f
commit
82b740bfc6
4 changed files with 14 additions and 5 deletions
BIN
bot.zip
Normal file
BIN
bot.zip
Normal file
Binary file not shown.
|
@ -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");
|
||||
|
|
|
@ -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]) {
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
<?php include("conn.php");
|
||||
|
||||
// ALTER TABLE `autonomous` CHANGE `starttime` `starttime` VARCHAR( 6 ) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '-1,-1'
|
||||
|
||||
if($_GET['del']) {
|
||||
mysql_query("DELETE FROM `autonomous` WHERE `id`=".$_GET['del']);
|
||||
header("Location: auto.php");
|
||||
|
@ -291,6 +293,7 @@ include("header.php");
|
|||
<?php
|
||||
echo "<option value='-1'". ($explodeTime[1] == "-1"?" selected='selected'":"") ."></option>";
|
||||
for($i = 0; $i <= 59; $i++) {
|
||||
echo "<!-- iteration $i looking for ". $explodeTime[1] ." from string ". $autono->starttime ." -->";
|
||||
echo "<option value='$i'". ($explodeTime[1] == "".$i?" selected='selected'":"") .">". (($i<10)?"0":"") ."$i</option>";
|
||||
}
|
||||
?>
|
||||
|
|
Loading…
Reference in a new issue