From 6504dfcaa1b648c18062b5f9b01259e7db3cdac1 Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Wed, 14 Apr 2004 14:35:06 +0000 Subject: [PATCH] Ooh, a better implementation. I rock. --- plugins/WordStats.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/WordStats.py b/plugins/WordStats.py index 462716223..423caa6a9 100644 --- a/plugins/WordStats.py +++ b/plugins/WordStats.py @@ -185,6 +185,10 @@ class WordStats(callbacks.Privmsg): self.db.close() callbacks.Privmsg.die(self) + def callCommand(self, *args, **kwargs): + self.queried = True + return callbacks.Privmsg.callCommand(self, *args, **kwargs) + def doPrivmsg(self, irc, msg): # This depends on the fact that it's called after the command. try: @@ -211,7 +215,6 @@ class WordStats(callbacks.Privmsg): irc.error(' must not contain non-alphanumeric chars.') return self.db.addWord(channel, word) - self.queried = True irc.replySuccess() def remove(self, irc, msg, args): @@ -276,7 +279,6 @@ class WordStats(callbacks.Privmsg): if count: s = '%s has said %r %s.' % \ (user, word, utils.nItems('time', count)) - self.queried = True irc.reply(s) else: irc.error('%s has never said %r.' % (user, word)) @@ -286,7 +288,6 @@ class WordStats(callbacks.Privmsg): if total == 0: irc.reply('I\'m keeping stats on %s, but I haven\'t seen it ' 'in this channel.' % word) - self.queried = True return n = self.registryValue('rankingDisplay', channel) try: @@ -318,7 +319,6 @@ class WordStats(callbacks.Privmsg): else: s = '' ret = '%s %s.%s' % (ret, utils.commaAndify(L), s) - self.queried = True irc.reply(ret) else: user = arg1