mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-25 04:02:46 +01:00
Add name ordering and mode-characters for relay names. Name ordering is also
done by mode (ops sorted, then voices, etc)
This commit is contained in:
parent
4200349aea
commit
25aacc3cd7
@ -290,9 +290,27 @@ class Relay(callbacks.Privmsg, plugins.Toggleable):
|
|||||||
return
|
return
|
||||||
users = []
|
users = []
|
||||||
for (abbreviation, otherIrc) in self.ircs.iteritems():
|
for (abbreviation, otherIrc) in self.ircs.iteritems():
|
||||||
|
ops = []
|
||||||
|
halfops = []
|
||||||
|
voices = []
|
||||||
|
usersS = []
|
||||||
if abbreviation != self.abbreviations[realIrc]:
|
if abbreviation != self.abbreviations[realIrc]:
|
||||||
Channel = otherIrc.state.channels[channel]
|
Channel = otherIrc.state.channels[channel]
|
||||||
usersS = ', '.join([s for s in Channel.users if s.strip()!=''])
|
for s in Channel.users:
|
||||||
|
s = s.strip()
|
||||||
|
if not s:
|
||||||
|
continue
|
||||||
|
elif s in Channel.ops:
|
||||||
|
ops.append('@%s' % s)
|
||||||
|
elif s in Channel.halfops:
|
||||||
|
halfops.append('%%%s' % s)
|
||||||
|
elif s in Channel.voices:
|
||||||
|
voices.append('+%s' % s)
|
||||||
|
else:
|
||||||
|
usersS.append(s)
|
||||||
|
map(list.sort, (ops, halfops, voices, usersS))
|
||||||
|
usersS = ', '.join(filter(None, map(', '.join,
|
||||||
|
(ops,halfops,voices,usersS))))
|
||||||
users.append('%s: %s' % (ircutils.bold(abbreviation), usersS))
|
users.append('%s: %s' % (ircutils.bold(abbreviation), usersS))
|
||||||
irc.reply(msg, '; '.join(users))
|
irc.reply(msg, '; '.join(users))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user