From f886d6529f170ca84e122da53881f6709f825376 Mon Sep 17 00:00:00 2001 From: Daniel DiPaolo Date: Mon, 29 Dec 2003 03:12:47 +0000 Subject: [PATCH] fixed another .0 bug --- plugins/Karma.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/Karma.py b/plugins/Karma.py index 38ed765f0..32954c217 100644 --- a/plugins/Karma.py +++ b/plugins/Karma.py @@ -165,18 +165,18 @@ class Karma(callbacks.PrivmsgCommandAndRegexp, else: irc.reply(msg, 'I didn\'t know the karma for any ' 'of those things.') - else: # No name was given. Return the top/bottom 3 karmas. + else: # No name was given. Return the top/bottom N karmas. limit = self.configurables.get('karma-ranking-display', channel) cursor.execute("""SELECT name, added-subtracted FROM karma ORDER BY added-subtracted DESC LIMIT %s""", limit) - highest = ['%r (%s)' % (t[0], t[1]) for t in cursor.fetchall()] + highest=['%r (%s)' % (t[0], int(t[1])) for t in cursor.fetchall()] cursor.execute("""SELECT name, added-subtracted FROM karma ORDER BY added-subtracted ASC LIMIT %s""", limit) - lowest = ['%r (%s)' % (t[0], t[1]) for t in cursor.fetchall()] + lowest=['%r (%s)' % (t[0], int(t[1])) for t in cursor.fetchall()] if not (highest and lowest): irc.error(msg, 'I have no karma for this channel.') else: