From f18eafc8d86d42d3bdf492ef677f8eaf47f41e63 Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Thu, 7 May 2020 21:36:54 +0200 Subject: [PATCH] Fix crash on simulated echos (they don't have a prefix set). --- src/callbacks.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/callbacks.py b/src/callbacks.py index 5c7f08ab3..c2c0d8374 100644 --- a/src/callbacks.py +++ b/src/callbacks.py @@ -1418,9 +1418,10 @@ class PluginMixin(BasePlugin, irclib.IrcCallback): noIgnore = self.noIgnore(irc, msg) else: noIgnore = self.noIgnore - if noIgnore or \ - not ircdb.checkIgnored(msg.prefix, msg.channel) or \ - not ircutils.isUserHostmask(msg.prefix): # Some services impl. + if (noIgnore or + not msg.prefix or # simulated echo message + not ircdb.checkIgnored(msg.prefix, msg.channel) or + not ircutils.isUserHostmask(msg.prefix)): # Some services impl. self.__parent.__call__(irc, msg) else: self.__parent.__call__(irc, msg)