From 250df8538c838063d7e18a11bc9c966fa7bf1487 Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Thu, 5 Aug 2004 04:01:22 +0000 Subject: [PATCH] Slight update to make the code a touch cleaner. --- plugins/Seen.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/plugins/Seen.py b/plugins/Seen.py index f34f0c2c0..9906e1afd 100644 --- a/plugins/Seen.py +++ b/plugins/Seen.py @@ -57,14 +57,12 @@ import supybot.privmsgs as privmsgs import supybot.registry as registry import supybot.callbacks as callbacks -def ircToLowerOrInt(x): - if isinstance(x, int): - return x - else: - return ircutils.toLower(x) - class IrcStringAndIntDict(utils.InsensitivePreservingDict): - key = staticmethod(ircToLowerOrInt) + def key(self, x): + if isinstance(x, int): + return x + else: + return ircutils.toLower(x) class SeenDB(plugins.ChannelUserDB): IdDict = IrcStringAndIntDict