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: for channel in channels:
chan = irc.state.channels.get(channel) chan = irc.state.channels.get(channel)
if chan: if chan:
# Skip channels the callee isn't in. This prevents us # Skip channels the callee isn't in. This helps prevents
# leaking information when the channel is +s or the target # us leaking information when the channel is +s or the
# is +i # target is +i
if replyMsg.nick not in chan.users: if replyMsg.nick not in chan.users:
continue 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('@'): if channel.startswith('@'):
ops.append(channel[1:]) ops.append(channel[1:])
elif channel.startswith('%'): elif channel.startswith('%'):