mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-23 19:22:45 +01:00
Fixed bug in Irc.reset.
This commit is contained in:
parent
1131cc4f15
commit
d9b994f6fe
@ -354,7 +354,7 @@ class Irc(object):
|
||||
self.state.reset()
|
||||
self.queue.reset()
|
||||
self.lastping = time.time()
|
||||
self.outstandingPongs = False
|
||||
self.outstandingPing = False
|
||||
self.fastqueue = queue()
|
||||
if self.password:
|
||||
self.queue.enqueue(ircmsgs.password(self.password))
|
||||
@ -366,6 +366,13 @@ class Irc(object):
|
||||
def addCallback(self, callback):
|
||||
self.callbacks.append(callback)
|
||||
|
||||
def getCallback(self, name):
|
||||
for callback in self.callbacks:
|
||||
if callback.name() == name:
|
||||
return callback
|
||||
else:
|
||||
return None
|
||||
|
||||
def removeCallback(self, name):
|
||||
(bad, good) = partition(lambda cb: cb.name() == name, self.callbacks)
|
||||
self.callbacks[:] = good
|
||||
|
Loading…
Reference in New Issue
Block a user