Do not crash on privmsg with no content
There is a corner case (/dcc chat) where a privmsg can have no content. Ignore such corner cases instead of crashing. Change-Id: Ia07c76c4a2342bb4e7bc9c37a4944d4b9f18efd8
This commit is contained in:
parent
4f32e1fbf7
commit
1db00eafb8
@ -96,6 +96,9 @@ class PTGBot(SASL, SSL, irc.bot.SingleServerIRCBot):
|
||||
nick = e.source.split('!')[0]
|
||||
msg = e.arguments[0][1:]
|
||||
words = msg.split()
|
||||
if len(words) < 1:
|
||||
self.log.debug("Ignoring privmsg with no content")
|
||||
return
|
||||
cmd = words[0].lower()
|
||||
words.pop(0)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user