From c19ea74fb45c64dc080d1074485d7388e79091b9 Mon Sep 17 00:00:00 2001 From: James Lu Date: Mon, 20 Mar 2017 22:22:43 -0700 Subject: [PATCH] ServiceBot: ignore attempts to call empty commands --- utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils.py b/utils.py index ed5b0c1..80e37a4 100644 --- a/utils.py +++ b/utils.py @@ -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