From 6ea38aeffca04755f96dc8a5a589639742e35f95 Mon Sep 17 00:00:00 2001 From: Daniel DiPaolo Date: Thu, 6 Nov 2003 16:41:49 +0000 Subject: [PATCH] Changed wordstats to use accessor ircdb.users.getUser instead of accessing the ircdb.users.users data structure directly. --- plugins/ChannelDB.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/ChannelDB.py b/plugins/ChannelDB.py index 84f25de46..8939210fa 100644 --- a/plugins/ChannelDB.py +++ b/plugins/ChannelDB.py @@ -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()]