mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 11:09:23 +01:00
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:
parent
a035492295
commit
fa5ad68958
@ -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('%'):
|
||||
|
Loading…
Reference in New Issue
Block a user