diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2018-09-12 14:41:56 +0200 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2018-09-12 14:41:56 +0200 |
commit | dcdef72da9a5f9f49f9bbcffb968cb15445e08c8 (patch) | |
tree | 02037ba6bfaebf2509afe3007e227785746c21db | |
parent | b534916115d0115f22e79db30361c54403bd16f3 (diff) | |
download | albotty-dcdef72da9a5f9f49f9bbcffb968cb15445e08c8.tar.bz2 albotty-dcdef72da9a5f9f49f9bbcffb968cb15445e08c8.tar.xz |
cleanup some debug lines
-rw-r--r-- | bot.lua | 14 |
1 files changed, 3 insertions, 11 deletions
@@ -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) |