From ccf759679be7b992aa20d9946b166dc7ed1b4483 Mon Sep 17 00:00:00 2001 From: James Lu Date: Sat, 18 Jul 2015 12:05:24 -0700 Subject: [PATCH] relay: fix the wrong modes being propagated to the wrong channels tl;dr, this was two bugs in one! Closes #53. --- plugins/relay.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/relay.py b/plugins/relay.py index b2b63a2..1da63fa 100644 --- a/plugins/relay.py +++ b/plugins/relay.py @@ -362,7 +362,7 @@ def relayModes(irc, remoteirc, sender, channel, modes=None): if remotechan is None: return if modes is None: - modes = remoteirc.channels[remotechan].modes + modes = irc.channels[channel].modes log.debug('(%s) Relay mode: channel data for %s%s: %s', irc.name, remoteirc.name, remotechan, remoteirc.channels[remotechan]) supported_modes = [] log.debug('(%s) Relay mode: initial modelist for %s is %s', irc.name, channel, modes) @@ -396,9 +396,9 @@ def relayModes(irc, remoteirc, sender, channel, modes=None): # Check if the sender is a user; remember servers are allowed to set modes too. if sender in irc.users: u = getRemoteUser(irc, remoteirc, sender) - remoteirc.proto.modeClient(remoteirc, u, channel, supported_modes) + remoteirc.proto.modeClient(remoteirc, u, remotechan, supported_modes) else: - remoteirc.proto.modeServer(remoteirc, remoteirc.sid, channel, supported_modes) + remoteirc.proto.modeServer(remoteirc, remoteirc.sid, remotechan, supported_modes) def handle_mode(irc, numeric, command, args): target = args['target']