3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-12-24 11:42:51 +01:00

ServiceBot: ignore attempts to call empty commands

This commit is contained in:
James Lu 2017-03-20 22:22:43 -07:00
parent 2ca0cf05a0
commit c19ea74fb4

View File

@ -335,8 +335,8 @@ class ServiceBot():
cmd = cmd_args[0].lower()
cmd_args = cmd_args[1:]
if cmd not in self.commands:
if not cmd.startswith('\x01'):
# Ignore invalid command errors from CTCPs.
if cmd and not cmd.startswith('\x01'):
# Ignore empty commands and invalid command errors from CTCPs.
self.reply(irc, 'Error: Unknown command %r.' % cmd)
log.info('(%s/%s) Received unknown command %r from %s', irc.name, self.name, cmd, irc.getHostmask(source))
return