From fa5ad68958279a1b5e2e6eca4f317bc7130e78a2 Mon Sep 17 00:00:00 2001 From: James Vega Date: Thu, 4 Aug 2005 18:53:58 +0000 Subject: [PATCH] plugins/Network: Don't include +s channels in Network.whois reply if the reply isn't going to the +s channel. --- plugins/Network/plugin.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/plugins/Network/plugin.py b/plugins/Network/plugin.py index 28555c936..ef9e3d362 100644 --- a/plugins/Network/plugin.py +++ b/plugins/Network/plugin.py @@ -162,11 +162,16 @@ class Network(callbacks.Plugin): for channel in channels: chan = irc.state.channels.get(channel) if chan: - # Skip channels the callee isn't in. This prevents us - # leaking information when the channel is +s or the target - # is +i + # Skip channels the callee isn't in. This helps prevents + # us leaking information when the channel is +s or the + # target is +i if replyMsg.nick not in chan.users: continue + # Skip +s channels the target is in only if the reply isn't + # being sent to that channel + if 's' in chan.modes and \ + not ircutils.strEqual(replyMsg.args[0], channel): + continue if channel.startswith('@'): ops.append(channel[1:]) elif channel.startswith('%'):