mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-30 14:59:34 +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[:-len(irc.nick)]
|
||||||
payload = payload.strip(', ') # Strip punctuation separating nick.
|
payload = payload.strip(', ') # Strip punctuation separating nick.
|
||||||
payload += '?' # So doUnknown gets called.
|
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)
|
msg = ircmsgs.privmsg(msg.args[0], payload, prefix=msg.prefix)
|
||||||
callbacks.PrivmsgCommandAndRegexp.doPrivmsg(self, irc, msg)
|
callbacks.PrivmsgCommandAndRegexp.doPrivmsg(self, irc, msg)
|
||||||
finally:
|
finally:
|
||||||
|
Loading…
Reference in New Issue
Block a user