Added the number of people to Relay.names.

This commit is contained in:
Jeremy Fincher 2003-11-28 18:22:41 +00:00
parent 13b718ff96
commit b0fa390f99

View File

@ -309,10 +309,12 @@ class Relay(callbacks.Privmsg, plugins.Configurable):
s = 'Somehow I\'m not in %s on %s.'% (channel,abbreviation) s = 'Somehow I\'m not in %s on %s.'% (channel,abbreviation)
irc.error(msg, s) irc.error(msg, s)
return return
numUsers = 0
for s in Channel.users: for s in Channel.users:
s = s.strip() s = s.strip()
if not s: if not s:
continue continue
numUsers += 1
elif s in Channel.ops: elif s in Channel.ops:
ops.append('@%s' % s) ops.append('@%s' % s)
elif s in Channel.halfops: elif s in Channel.halfops:
@ -327,7 +329,9 @@ class Relay(callbacks.Privmsg, plugins.Configurable):
utils.sortBy(ircutils.toLower, usersS) utils.sortBy(ircutils.toLower, usersS)
usersS = ', '.join(ifilter(None, imap(', '.join, usersS = ', '.join(ifilter(None, imap(', '.join,
(ops,halfops,voices,usersS)))) (ops,halfops,voices,usersS))))
users.append('%s: %s' % (ircutils.bold(abbreviation), usersS)) users.append('%s (%s): %s' %
(ircutils.bold(abbreviation), numUsers, usersS))
users.sort()
irc.reply(msg, '; '.join(users)) irc.reply(msg, '; '.join(users))
def whois(self, irc, msg, args): def whois(self, irc, msg, args):