3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-24 03:29:28 +01:00

Irc: log unrecognized commands to INFO too

This commit is contained in:
James Lu 2015-10-23 19:07:17 -07:00
parent 2bf9568fbb
commit e4cfd1e1e6

View File

@ -178,11 +178,13 @@ class Irc():
return
def callCommand(self, source, text):
"""Calls a PyLink bot command."""
cmd_args = text.strip().split(' ')
cmd = cmd_args[0].lower()
cmd_args = cmd_args[1:]
if cmd not in world.commands:
self.msg(self.called_by or source, 'Error: Unknown command %r.' % cmd)
log.info('(%s) Received unknown command %r from %s', self.name, cmd, utils.getHostmask(self, source))
return
log.info('(%s) Calling command %r for %s', self.name, cmd, utils.getHostmask(self, source))
for func in world.commands[cmd]: