plugins/Network: Fix an information leak in Network.whois

This commit is contained in:
James Vega 2005-07-16 14:41:07 +00:00
parent 91874dba2c
commit 75ecf79d58

View File

@ -160,6 +160,13 @@ class Network(callbacks.Plugin):
normal = [] normal = []
halfops = [] halfops = []
for channel in channels: 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
if replyMsg.nick not in chan.users:
continue
if channel.startswith('@'): if channel.startswith('@'):
ops.append(channel[1:]) ops.append(channel[1:])
elif channel.startswith('%'): elif channel.startswith('%'):