diff --git a/ai.lua b/ai.lua index 3014536..abf036a 100644 --- a/ai.lua +++ b/ai.lua @@ -5,6 +5,9 @@ {"I really like Queens of the Stone Age","Paramore is pretty good.","Green Day is great to listen to."}, {"music","favorite","like","?"} },{ +{"tsunbot a shit","tsunbot should pull a ThatAnon","tsunbot should self-terminate."}, +{"tsunbot","tsunbot","tsunbot","tsunbot","tsunbot","tsunbot","tsunbot","tsunbot","tsunbot","tsunbot",} +},{ {"Yes.","No.","Perhaps."}, {"?","?"} }} diff --git a/config.lua b/config.lua index a6bc010..5881777 100644 --- a/config.lua +++ b/config.lua @@ -1,5 +1,5 @@ -{server="irc.quakenet.org", -nick="yukichan", +{server="irc.freenode.net", +nick="yukichan2", hostname="lain", servername="lain", realname="yuki", @@ -20,7 +20,7 @@ timers={ "highfive.lua" }, debug=false, -autojoin=true, +autojoin=false, prefix=":", username="yuki", port=6667, diff --git a/init.lua b/init.lua index 5b0f08e..5a9acb2 100644 --- a/init.lua +++ b/init.lua @@ -152,6 +152,14 @@ function parsemsg(nick,chan,message) sendchan(chan,"Bye! o/") writeln("QUIT :Blame telstra.") print("Killed by "..nick) + os.exit(0) + end + elseif tCommand[1] == "restart" then + if checkAdmin(nick) then + sendchan(chan,"Bye! o/") + writeln("QUIT :Blame telstra.") + print("Killed by "..nick) + os.exit(1) end elseif cmds[tCommand[1]] ~= nil then local fail, errors = pcall(cmds[tCommand[1]],nick,chan,tCommand,message) @@ -229,9 +237,12 @@ function main() if line ~= nil and line ~= "timeout" then print(line) pcall(parse,line) - elseif line == "timeout" and os.time() > _G.lastping + config.timeout then - print("Connection to IRC timed out, aborting.") - break + else +--[[ if (line == "timeout" or line == nil) and os.time() > _G.lastping + config.timeout then + print(line) + print("Connection to IRC timed out, aborting.") + os.exit(1) + end]]-- end for k,v in ipairs(timers) do local fail, errors = pcall(v,line)