From 6eacfb6c26ec1e906cbd5112beeda8a8445e424d Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Tue, 22 Apr 2003 11:18:57 +0000 Subject: [PATCH] Changed IrcState.history to a RingBuffer instead of a MaxLengthQueue. --- src/irclib.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/irclib.py b/src/irclib.py index bedba788a..0eb56ccc7 100644 --- a/src/irclib.py +++ b/src/irclib.py @@ -30,7 +30,7 @@ ### from fix import * -from structures import queue, MaxLengthQueue +from structures import queue, RingBuffer import copy import time @@ -171,7 +171,7 @@ class IrcState(object): self.reset() def reset(self): - self.history = MaxLengthQueue(conf.maxHistory) + self.history = RingBuffer(conf.maxHistory) self.nicksToHostmasks = ircutils.IrcDict() self.channels = ircutils.IrcDict() @@ -192,7 +192,7 @@ class IrcState(object): return ret def addMsg(self, irc, msg): - self.history.enqueue(msg) + self.history.append(msg) if ircutils.isUserHostmask(msg.prefix) and not msg.command == 'NICK': self.nicksToHostmasks[msg.nick] = msg.prefix if msg.command == '352': # Response to a WHO command.