From dcdef72da9a5f9f49f9bbcffb968cb15445e08c8 Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Wed, 12 Sep 2018 14:41:56 +0200 Subject: cleanup some debug lines --- bot.lua | 14 +++----------- 1 file 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) -- cgit v1.2.3