Only write the file if we're monitoring words.

This commit is contained in:
Jeremy Fincher 2004-08-10 15:45:03 +00:00
parent 532ac414a0
commit 1b10c0ad26

View File

@ -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():