irc: fix command splitting creating empty tokens

This commit is contained in:
moneromooo 2015-02-07 22:40:08 +00:00
parent 7b90901049
commit 5de54e005c
1 changed files with 2 additions and 0 deletions

View File

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