3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-01 09:19:23 +01:00

relay: show secret channels in LINKED to those in the channel

Closes #278.
This commit is contained in:
James Lu 2016-07-16 21:07:08 -07:00
parent b79f391be6
commit 94f2422a1e

View File

@ -1650,9 +1650,10 @@ def linked(irc, source, args):
if remoteirc and channel in remoteirc.channels: if remoteirc and channel in remoteirc.channels:
c = remoteirc.channels[channel] c = remoteirc.channels[channel]
if ('s', None) in c.modes or ('p', None) in c.modes: if ('s', None) in c.modes or ('p', None) in c.modes:
# Only show secret channels to opers, and tag them with # Only show secret channels to opers or those in the channel, and tag them as
# [secret]. # [secret].
if irc.isOper(source): localchan = getRemoteChan(remoteirc, irc, channel)
if irc.isOper(source) or (localchan and source in irc.channels[localchan].users):
s += '\x02[secret]\x02 ' s += '\x02[secret]\x02 '
else: else:
continue continue