mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-27 05:09:23 +01:00
Changed many dictionaries to the more appropriate ircutils.IrcDict.
This commit is contained in:
parent
5a8f0ce7fa
commit
6aa1e8a7ed
@ -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():
|
||||
|
@ -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))
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user