mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-02 17:29:22 +01:00
According to pysqlite 0.50.0 you can have a fractional number of items in a db
:(
This commit is contained in:
parent
1ff44651a9
commit
9277d4113f
@ -533,7 +533,7 @@ class MoobotFactoids(callbacks.PrivmsgCommandAndRegexp):
|
|||||||
cursor.execute("""SELECT created_by, count(key) FROM factoids
|
cursor.execute("""SELECT created_by, count(key) FROM factoids
|
||||||
GROUP BY created_by
|
GROUP BY created_by
|
||||||
ORDER BY count(key) DESC LIMIT %s""", limit)
|
ORDER BY count(key) DESC LIMIT %s""", limit)
|
||||||
L = ['%s (%s)' % (ircdb.users.getUser(t[0]).name, t[1])
|
L = ['%s (%s)' % (ircdb.users.getUser(t[0]).name, int(t[1]))
|
||||||
for t in cursor.fetchall()]
|
for t in cursor.fetchall()]
|
||||||
return 'Most prolific %s: %s' % \
|
return 'Most prolific %s: %s' % \
|
||||||
(utils.pluralize(len(L), 'author'), utils.commaAndify(L))
|
(utils.pluralize(len(L), 'author'), utils.commaAndify(L))
|
||||||
|
Loading…
Reference in New Issue
Block a user