plugins/Network: Don't include +s channels in Network.whois reply if the reply isn't going to the +s channel.

This commit is contained in:
James Vega 2005-08-04 18:53:58 +00:00
parent a035492295
commit fa5ad68958

View File

@ -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('%'):