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