mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-24 03:29:28 +01:00
Slight update to make the code a touch cleaner.
This commit is contained in:
parent
76a79b0d76
commit
250df8538c
@ -57,15 +57,13 @@ import supybot.privmsgs as privmsgs
|
|||||||
import supybot.registry as registry
|
import supybot.registry as registry
|
||||||
import supybot.callbacks as callbacks
|
import supybot.callbacks as callbacks
|
||||||
|
|
||||||
def ircToLowerOrInt(x):
|
class IrcStringAndIntDict(utils.InsensitivePreservingDict):
|
||||||
|
def key(self, x):
|
||||||
if isinstance(x, int):
|
if isinstance(x, int):
|
||||||
return x
|
return x
|
||||||
else:
|
else:
|
||||||
return ircutils.toLower(x)
|
return ircutils.toLower(x)
|
||||||
|
|
||||||
class IrcStringAndIntDict(utils.InsensitivePreservingDict):
|
|
||||||
key = staticmethod(ircToLowerOrInt)
|
|
||||||
|
|
||||||
class SeenDB(plugins.ChannelUserDB):
|
class SeenDB(plugins.ChannelUserDB):
|
||||||
IdDict = IrcStringAndIntDict
|
IdDict = IrcStringAndIntDict
|
||||||
def serialize(self, v):
|
def serialize(self, v):
|
||||||
|
Loading…
Reference in New Issue
Block a user