diff options
author | lassulus <lassulus@googlemail.com> | 2014-01-09 23:42:13 +0100 |
---|---|---|
committer | lassulus <lassulus@googlemail.com> | 2014-01-09 23:42:13 +0100 |
commit | 35e13322e83e95d7b4e671e72bcd885277433f99 (patch) | |
tree | 145eed93d60a37012509fc42fbd31fa95aa8179f | |
parent | 35406d4fc7bf83c954b225747ac6c13a6aad2994 (diff) |
ircbot: fix empty first arg bug
-rwxr-xr-x | ircbot/controller.py (renamed from ircbot/contoller.py) | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ircbot/contoller.py b/ircbot/controller.py index 59c3abb8..66c42bd7 100755 --- a/ircbot/contoller.py +++ b/ircbot/controller.py @@ -33,7 +33,7 @@ class NewsBot(irc.bot.SingleServerIRCBot): def on_pubmsg(self, connection, event): args_array = event.arguments[0].split() - if args_array[0][:-1]==self.name: + if len(args_array[0]) > 0 and args_array[0][:-1]==self.name: answer = self.read_message(args_array[1:]) self.send(event.target, answer) |