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:
|
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('%'):
|
||||||
|
Loading…
Reference in New Issue
Block a user