Fix crash on simulated echos (they don't have a prefix set).

This commit is contained in:
Valentin Lorentz 2020-05-07 21:36:54 +02:00
parent 83a8afde16
commit f18eafc8d8

View File

@ -1418,9 +1418,10 @@ class PluginMixin(BasePlugin, irclib.IrcCallback):
noIgnore = self.noIgnore(irc, msg) noIgnore = self.noIgnore(irc, msg)
else: else:
noIgnore = self.noIgnore noIgnore = self.noIgnore
if noIgnore or \ if (noIgnore or
not ircdb.checkIgnored(msg.prefix, msg.channel) or \ not msg.prefix or # simulated echo message
not ircutils.isUserHostmask(msg.prefix): # Some services impl. not ircdb.checkIgnored(msg.prefix, msg.channel) or
not ircutils.isUserHostmask(msg.prefix)): # Some services impl.
self.__parent.__call__(irc, msg) self.__parent.__call__(irc, msg)
else: else:
self.__parent.__call__(irc, msg) self.__parent.__call__(irc, msg)