From 1b10c0ad26d891d5662d3c399567410be26f6891 Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Tue, 10 Aug 2004 15:45:03 +0000 Subject: [PATCH] Only write the file if we're monitoring words. --- plugins/WordStats.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/WordStats.py b/plugins/WordStats.py index df7a68eaf..4c4f8b130 100644 --- a/plugins/WordStats.py +++ b/plugins/WordStats.py @@ -68,6 +68,10 @@ class WordStatsDB(plugins.ChannelUserDB): self.channelWords = ircutils.IrcDict() plugins.ChannelUserDB.__init__(self, *args, **kwargs) + def close(self): + if self.channelWords: + plugins.ChannelUserDB.close(self) + def serialize(self, v): L = [] for (word, count) in v.iteritems():