From 5de54e005c8d7786276aefe98d9bfa0605c7bc4a Mon Sep 17 00:00:00 2001 From: moneromooo Date: Sat, 7 Feb 2015 22:40:08 +0000 Subject: [PATCH] irc: fix command splitting creating empty tokens --- tipbot/modules/irc.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tipbot/modules/irc.py b/tipbot/modules/irc.py index f0ec4dc..00f90f5 100644 --- a/tipbot/modules/irc.py +++ b/tipbot/modules/irc.py @@ -316,6 +316,8 @@ class IRCNetwork(Network): if exidx != -1 and len(text)>exidx+1 and text[exidx+1] in string.ascii_letters and self.is_acceptable_command_prefix(text[:exidx]): cmd = text.split('!')[1] cmd = cmd.split(' ') + while '' in cmd: + cmd.remove('') cmd[0] = cmd[0].strip(' \t\n\r') log_log('Found command from %s: "%s" in channel "%s"' % (who, str(cmd), str(chan)))