http://git.etherboot.org
/
people
/
stefanha
/
gpxebot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
58de236
)
Protect against empty privmsgs
author
Stefan Hajnoczi
<stefanha@gmail.com>
Sun, 28 Jun 2009 16:20:56 +0000
(17:20 +0100)
committer
Stefan Hajnoczi
<stefanha@gmail.com>
Sun, 28 Jun 2009 16:20:56 +0000
(17:20 +0100)
gpxebot.py
patch
|
blob
|
history
diff --git
a/gpxebot.py
b/gpxebot.py
index
a20920a
..
45f11a8
100755
(executable)
--- a/
gpxebot.py
+++ b/
gpxebot.py
@@
-50,7
+50,6
@@
def do_response(response):
return False
if isinstance(response, list):
return any(do_response(r) for r in response)
- print response
(command, args) = response
if command == 'PRIVMSG':
pmsg(*args)
@@
-68,6
+67,8
@@
def privmsg(_, target, msg):
utils.do_log(cmds.logs, target, who.nick, msg)
words = msg.split()
+ if not words:
+ return False
if target.startswith('#'):
replyto = target
if not config.NICK in words[0]: