From f2fdaf55a1550e809b5c27773effe1ca5b2c61e1 Mon Sep 17 00:00:00 2001 From: James Lu Date: Fri, 24 Apr 2015 23:04:33 -0700 Subject: [PATCH] commands: add a command to print debug info to console --- plugins/commands.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plugins/commands.py b/plugins/commands.py index beec961..9830202 100644 --- a/plugins/commands.py +++ b/plugins/commands.py @@ -14,3 +14,8 @@ def tell(irc, source, args): proto._sendFromUser(irc, 'NOTICE %s :%s' % (irc.users[target].uid, text)) except KeyError: proto._sendFromUser(irc, 'PRIVMSG %s :unknown user %r' % (source, target)) + +@proto.add_cmd +def debug(irc, source, args): + proto._sendFromUser(irc, 'NOTICE %s :Debug info printed to console.' % (source)) + print(irc.users)