mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-02-17 06:00:42 +01:00
Changed wordstats to use accessor ircdb.users.getUser instead of accessing the
ircdb.users.users data structure directly.
This commit is contained in:
parent
adc9e0552d
commit
6ea38aeffc
@ -539,7 +539,7 @@ class ChannelDB(callbacks.Privmsg,plugins.Toggleable,plugins.ChannelDBHandler):
|
|||||||
'%rer' % arg1)
|
'%rer' % arg1)
|
||||||
l = []
|
l = []
|
||||||
for (count, id) in results:
|
for (count, id) in results:
|
||||||
username = ircdb.users.users[id].name
|
username = ircdb.users.getUser(id).name
|
||||||
l.append('%s: %s' % (username, count))
|
l.append('%s: %s' % (username, count))
|
||||||
s += utils.commaAndify(l)
|
s += utils.commaAndify(l)
|
||||||
irc.reply(msg, s)
|
irc.reply(msg, s)
|
||||||
@ -551,8 +551,8 @@ class ChannelDB(callbacks.Privmsg,plugins.Toggleable,plugins.ChannelDBHandler):
|
|||||||
AND word_stats.user_id=%s
|
AND word_stats.user_id=%s
|
||||||
ORDER BY words.word""", id)
|
ORDER BY words.word""", id)
|
||||||
if cursor.rowcount == 0:
|
if cursor.rowcount == 0:
|
||||||
username = ircdb.users.users[id].name
|
username = ircdb.users.getUser(id).name
|
||||||
irc.error('%r has no wordstats' % username)
|
irc.error(msg, '%r has no wordstats' % username)
|
||||||
return
|
return
|
||||||
l = [('%r: %s' % (word, count)) for \
|
l = [('%r: %s' % (word, count)) for \
|
||||||
(word, count) in cursor.fetchall()]
|
(word, count) in cursor.fetchall()]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user