mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-27 21:19:31 +01:00
coreplugin: use IrcChannel.getPrefixModes in whois replies
This commit is contained in:
parent
f5f0df52ce
commit
c176c90bb6
@ -59,12 +59,14 @@ def handle_whois(irc, source, command, args):
|
||||
(irc.cmodes.get('private'), None) in c.modes) \
|
||||
and not (sourceisOper or source in c.users):
|
||||
continue
|
||||
|
||||
# Show prefix modes like a regular IRCd does.
|
||||
for prefixmode, prefixchar in irc.prefixmodes.items():
|
||||
modename = [mname for mname, char in irc.cmodes.items() if char == prefixmode]
|
||||
if modename and target in c.prefixmodes[modename[0]]:
|
||||
chan = prefixchar + chan
|
||||
for prefixmode in c.getPrefixModes(target):
|
||||
modechar = irc.cmodes[prefixmode]
|
||||
chan = irc.prefixmodes[modechar] + chan
|
||||
|
||||
public_chans.append(chan)
|
||||
|
||||
if public_chans: # Only send the line if the person is in any visible channels...
|
||||
f(server, 319, source, '%s :%s' % (nick, ' '.join(public_chans)))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user