3
0
mirror of https://github.com/jlu5/PyLink.git synced 2025-01-23 10:44:09 +01:00

commands: add a command to print debug info to console

This commit is contained in:
James Lu 2015-04-24 23:04:33 -07:00
parent 6b79793336
commit f2fdaf55a1

View File

@ -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)