mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-27 05:09:23 +01:00
ChannelStats.rank now starts from 1 instead of 0
Signed-off-by: James Vega <jamessan@users.sourceforge.net>
This commit is contained in:
parent
aa9db7ba23
commit
169aee3bc0
@ -1,5 +1,6 @@
|
||||
###
|
||||
# Copyright (c) 2002-2004, Jeremiah Fincher
|
||||
# Copyright (c) 2009, James Vega
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
@ -60,6 +61,7 @@ class ChannelStat(irclib.IrcCommandDispatcher):
|
||||
self.smileys = smileys
|
||||
self.topics = topics
|
||||
self.words = words
|
||||
|
||||
def values(self):
|
||||
return [getattr(self, s) for s in self._values]
|
||||
|
||||
@ -311,7 +313,7 @@ class ChannelStats(callbacks.Plugin):
|
||||
users.append((v, ircdb.users.getUser(id).name))
|
||||
users.sort()
|
||||
users.reverse()
|
||||
s = utils.str.commaAndify(['#%s %s (%.3g)' % (i, u, v)
|
||||
s = utils.str.commaAndify(['#%s %s (%.3g)' % (i+1, u, v)
|
||||
for (i, (v, u)) in enumerate(users)])
|
||||
irc.reply(s)
|
||||
rank = wrap(rank, ['channeldb', 'text'])
|
||||
|
Loading…
Reference in New Issue
Block a user