From 7110b8f74e59fceef7ea939ce019958085ff27f0 Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Fri, 15 Jan 2021 21:24:23 +0100 Subject: [PATCH] Relay: Set msg.channel before passing it to _sendToOthers. _sendToOthers expects msg.channel to be 'in otherIrc.state.channels', but IrcMsg objects don't have their 'channel' attribute set until they are passed through irclib, so it was left unset, which means messages were never sent at all. Regression introduced in c1ae3f5c81cc8cf4effc7670e99c9270e31a1c9c. --- plugins/Relay/plugin.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/plugins/Relay/plugin.py b/plugins/Relay/plugin.py index 29d5d5491..755903196 100644 --- a/plugins/Relay/plugin.py +++ b/plugins/Relay/plugin.py @@ -299,9 +299,13 @@ class Relay(callbacks.Plugin): msg = dynamic.msg if self.registryValue('noticeNonPrivmsgs', target, network) and \ msg.command != 'PRIVMSG': - return ircmsgs.notice(target, s) + m = ircmsgs.notice(target, s) else: - return ircmsgs.privmsg(target, s) + m = ircmsgs.privmsg(target, s) + + m.channel = target + + return m def doJoin(self, irc, msg): irc = self._getRealIrc(irc)