mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 19:19:32 +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)
|
||||
l = []
|
||||
for (count, id) in results:
|
||||
username = ircdb.users.users[id].name
|
||||
username = ircdb.users.getUser(id).name
|
||||
l.append('%s: %s' % (username, count))
|
||||
s += utils.commaAndify(l)
|
||||
irc.reply(msg, s)
|
||||
@ -551,8 +551,8 @@ class ChannelDB(callbacks.Privmsg,plugins.Toggleable,plugins.ChannelDBHandler):
|
||||
AND word_stats.user_id=%s
|
||||
ORDER BY words.word""", id)
|
||||
if cursor.rowcount == 0:
|
||||
username = ircdb.users.users[id].name
|
||||
irc.error('%r has no wordstats' % username)
|
||||
username = ircdb.users.getUser(id).name
|
||||
irc.error(msg, '%r has no wordstats' % username)
|
||||
return
|
||||
l = [('%r: %s' % (word, count)) for \
|
||||
(word, count) in cursor.fetchall()]
|
||||
|
Loading…
Reference in New Issue
Block a user