From 818f01e2064bf062745c15d714d53c0746ae68c8 Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Wed, 2 Apr 2003 09:26:16 +0000 Subject: [PATCH] Converted Irc.fastqueue to a fix.queue --- src/irclib.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/irclib.py b/src/irclib.py index ddb4bf06c..362af5e2a 100644 --- a/src/irclib.py +++ b/src/irclib.py @@ -280,7 +280,7 @@ class Irc(object): self._nickmods = copy.copy(conf.nickmods) self.state = IrcState() self.queue = IrcMsgQueue() - self.fastqueue = [] + self.fastqueue = queue() self.lastping = time.time() self.lastTake = 0 self.driver = None # The driver should set this later. @@ -291,7 +291,7 @@ class Irc(object): self._nickmods = copy.copy(conf.nickmods) self.state.reset() self.queue.reset() - self.fastqueue = [] + self.fastqueue = queue() self.queue.enqueueMsg(ircmsgs.user(self.user, self.ident)) self.queue.enqueueMsg(ircmsgs.nick(self.nick)) for callback in self.callbacks: @@ -316,13 +316,13 @@ class Irc(object): self.queue.enqueueMsg(msg) def sendMsg(self, msg): - self.fastqueue.append(msg) + self.fastqueue.enqueue(msg) def takeMsg(self): now = time.time() msg = None if self.fastqueue: - msg = self.fastqueue.pop(0) + msg = self.fastqueue.dequeue() elif not self.queue.empty(): if now - self.lastTake <= conf.throttleTime: debug.debugMsg('Irc.takeMsg throttling.', 'verbose')