mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-27 05:09:23 +01:00
Let's avoid an assertion error by making sure we don't use empty msg's
This commit is contained in:
parent
0349d11853
commit
b6d28d7560
@ -486,6 +486,9 @@ class Infobot(callbacks.PrivmsgCommandAndRegexp):
|
||||
payload = payload[:-len(irc.nick)]
|
||||
payload = payload.strip(', ') # Strip punctuation separating nick.
|
||||
payload += '?' # So doUnknown gets called.
|
||||
if not payload.strip():
|
||||
self.log.debug('Bailing since we received an empty msg.')
|
||||
return
|
||||
msg = ircmsgs.privmsg(msg.args[0], payload, prefix=msg.prefix)
|
||||
callbacks.PrivmsgCommandAndRegexp.doPrivmsg(self, irc, msg)
|
||||
finally:
|
||||
|
Loading…
Reference in New Issue
Block a user