summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bot.lua14
1 files changed, 3 insertions, 11 deletions
diff --git a/bot.lua b/bot.lua
index a422cb8..4bd71af 100644
--- a/bot.lua
+++ b/bot.lua
@@ -242,10 +242,9 @@ function irc:handle(line)
local prefix, cmd, params = irc_parse(line)
callback = self.callbacks[cmd]
if type(callback) == "function" then
- print("DEBUG: calling handler for:", cmd, prefix, table.unpack(params))
return callback(self, prefix, table.unpack(params))
else
- print("DEBUG no handler for:", cmd, "prefix:",prefix)
+ print("DEBUG: no handler for:", cmd, "prefix:",prefix)
end
end
@@ -263,11 +262,8 @@ function irc:loop()
repeat
repeat
local ok, err = self:step()
- print("DEBUG step:", ok, err)
until not ok
-
cqueues.poll(self)
- print("DEBUG: loop")
until self.conn:eof()
end
@@ -302,8 +298,6 @@ end
function sockserver:run_callback(line)
local cmd = string.match(line, "^([^ ]+)")
local data = string.match(line, "^[^ ]+ (.*)")
- print("DEBUG: cmd:", cmd)
- print("DEBUG: data:", data)
if not cmd or type(self.callbacks[cmd]) ~= "function" then
return nil
end
@@ -333,6 +327,7 @@ end
---------------------------------------------------------------------------
+-- main
sess = irc.new()
@@ -377,9 +372,6 @@ loop:wrap(function()
srv:loop(loop)
end)
--------------------------------------------------------------------------------------------
--- mainloop
-
while not loop:empty() do
local ok, err = loop:step()
print("DEBUG: mainloop")
@@ -388,4 +380,4 @@ while not loop:empty() do
error("loop.step: "..err)
end
end
-os.remove(socketpath)
+os.remove(srv.path)