Changed many dictionaries to the more appropriate ircutils.IrcDict.

This commit is contained in:
Jeremy Fincher 2003-04-11 20:42:21 +00:00
parent 5a8f0ce7fa
commit 6aa1e8a7ed
3 changed files with 6 additions and 5 deletions

View File

@ -44,12 +44,13 @@ import debug
import world
import irclib
import ircmsgs
import ircutils
###
# Logger: Handles logging of IRC channels to files.
###
class ChannelLogger(irclib.IrcCallback):
logs = {}
logs = ircutils.IrcDict()
actionre = re.compile('\x01ACTION (.*)\x01')
def __init__(self):
self.laststate = None
@ -63,7 +64,7 @@ class ChannelLogger(irclib.IrcCallback):
def reset(self):
for log in self.logs.itervalues():
log.close()
self.logs = {}
self.logs = ircutils.IrcDict()
def flush(self):
for log in self.logs.itervalues():

View File

@ -178,7 +178,7 @@ class Relay(callbacks.Privmsg):
channels.
"""
channel = privmsgs.getArgs(args)
self.channels.add(channel)
self.channels.add(ircutils.toLower(channel))
for otherIrc in self.ircs.itervalues():
if channel not in otherIrc.state.channels:
otherIrc.queueMsg(ircmsgs.join(channel))
@ -193,7 +193,7 @@ class Relay(callbacks.Privmsg):
channel.
"""
channel = privmsgs.getArgs(args)
self.channels.remove(channel)
self.channels.remove(ircutils.toLower(channel))
for otherIrc in self.ircs.itervalues():
if channel in otherIrc.state.channels:
otherIrc.queueMsg(ircmsgs.part(channel))

View File

@ -252,7 +252,7 @@ class UsersDictionary(object):
fd.close()
self.dict = eval(normalize(s))
self.cache = {} # hostmasks to nicks.
self.revcache = {} # nicks to hostmasks.
self.revcache = ircutils.IrcDict() # nicks to hostmasks.
def resetCache(self, s):
if s in self.cache: