mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-11 12:42:34 +01:00
Changed IrcState.history to a queue().
This commit is contained in:
parent
e93f0e62d0
commit
f078d7fe1b
@ -159,7 +159,7 @@ class IrcState(object):
|
||||
self.reset()
|
||||
|
||||
def reset(self):
|
||||
self.history = []
|
||||
self.history = queue()
|
||||
self.nicksToHostmasks = {}
|
||||
self.channels = {}
|
||||
|
||||
@ -171,9 +171,9 @@ class IrcState(object):
|
||||
return ret
|
||||
|
||||
def addMsg(self, irc, msg):
|
||||
self.history.append(msg)
|
||||
self.history.enqueue(msg)
|
||||
if len(self.history) > conf.maxHistory:
|
||||
del self.history[0]
|
||||
self.history.dequeue()
|
||||
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.
|
||||
|
Loading…
Reference in New Issue
Block a user