From ca369afe59a020d1b97f3a3bf6635e50a285ce24 Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Sun, 2 May 2021 18:34:49 +0200 Subject: [PATCH] Relay: Send the right network in the display name (was dest instead of source) --- plugins/Relay/plugin.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/Relay/plugin.py b/plugins/Relay/plugin.py index 7137073b3..d8b3f45ce 100644 --- a/plugins/Relay/plugin.py +++ b/plugins/Relay/plugin.py @@ -248,18 +248,18 @@ class Relay(callbacks.Plugin): for otherIrc in world.ircs: if otherIrc != irc and not otherIrc.zombie: if msg.channel in otherIrc.state.channels: - self._sendToOther(otherIrc, msg, nick) + self._sendToOther(irc, otherIrc, msg, nick) - def _sendToOther(self, otherIrc, msg, nick): + def _sendToOther(self, sourceIrc, destIrc, msg, nick): msg = copy.deepcopy(msg) msg.tag('relayedMsg') - if 'message-tags' in otherIrc.state.capabilities_ack \ + if 'message-tags' in destIrc.state.capabilities_ack \ and conf.supybot.protocols.irc.experimentalExtensions(): displayName = self._formatDisplayName( - nick, otherIrc.network, msg.channel) + nick, sourceIrc.network, msg.channel) # https://github.com/ircv3/ircv3-specifications/pull/452 msg.server_tags['+draft/display-name'] = displayName - otherIrc.queueMsg(msg) + destIrc.queueMsg(msg) def _checkRelayMsg(self, msg): channel = msg.channel