From e3fce568003eb486e8125d90899535792fb6f1a5 Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Mon, 3 May 2021 20:02:33 +0200 Subject: [PATCH] Relay: Don't relay QUIT/NICK if the sender isn't in the relayed channel. --- plugins/Relay/plugin.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/Relay/plugin.py b/plugins/Relay/plugin.py index d8b3f45ce..1a2b184ba 100644 --- a/plugins/Relay/plugin.py +++ b/plugins/Relay/plugin.py @@ -399,6 +399,8 @@ class Relay(callbacks.Plugin): network = self._getIrcName(irc) s = format(_('nick change by %s to %s on %s'), msg.nick,newNick,network) for channel in self.registryValue('channels'): + if channel not in msg.tagged('channels'): + continue m = self._msgmaker(channel, network, s) self._sendToOthers(irc, m, msg.nick) @@ -438,6 +440,8 @@ class Relay(callbacks.Plugin): else: s = format(_('%s has quit %s.'), msg.nick, network) for channel in self.registryValue('channels'): + if channel not in msg.tagged('channels'): + continue m = self._msgmaker(channel, network, s) self._sendToOthers(irc, m, msg.nick)