From 8f13ae778ab6db600baf6fa52c309ea2ab2d03af Mon Sep 17 00:00:00 2001 From: James Lu Date: Tue, 21 Jul 2015 19:27:41 -0700 Subject: [PATCH] Fix regression in 024ac165 that caused channel messages to only be sent to one other net, instead of all relay links --- plugins/relay.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/relay.py b/plugins/relay.py index 4b6155a..f125931 100644 --- a/plugins/relay.py +++ b/plugins/relay.py @@ -283,6 +283,7 @@ def handle_privmsg(irc, numeric, command, args): text = args['text'] if target == irc.pseudoclient.uid: return + sent = 0 for netname, user in relayusers[(irc.name, numeric)].items(): remoteirc = utils.networkobjects[netname] # HACK: Don't break on sending to @#channel or similar. @@ -307,8 +308,8 @@ def handle_privmsg(irc, numeric, command, args): remoteirc.proto.noticeClient(remoteirc, user, real_target, text) else: remoteirc.proto.messageClient(remoteirc, user, real_target, text) - break - else: + sent += 1 + if not sent: # We must be on a common channel with the target. Otherwise, the sender # doesn't have a client representing them on the remote network, # and we won't have anywhere to send our messages from.