mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 19:19:32 +01:00
Changed conf.minHistory to conf.maxHistory.
This commit is contained in:
parent
6f49bd2813
commit
277a1a356d
@ -119,9 +119,9 @@ telnetPort = 31337
|
|||||||
asyncorePoll = 1
|
asyncorePoll = 1
|
||||||
|
|
||||||
###
|
###
|
||||||
# minHistory: Minimum number of messages kept in an Irc object's state.
|
# maxHistory: Maximum number of messages kept in an Irc object's state.
|
||||||
###
|
###
|
||||||
minHistory = 100
|
maxHistory = 100
|
||||||
|
|
||||||
###
|
###
|
||||||
# pingInterval: Number of seconds between PINGs to the server.
|
# pingInterval: Number of seconds between PINGs to the server.
|
||||||
|
@ -171,9 +171,9 @@ class IrcState(object):
|
|||||||
return ret
|
return ret
|
||||||
|
|
||||||
def addMsg(self, irc, msg):
|
def addMsg(self, irc, msg):
|
||||||
if len(self.history) > conf.minHistory + 10:
|
|
||||||
del self.history[:10]
|
|
||||||
self.history.append(msg)
|
self.history.append(msg)
|
||||||
|
if len(self.history) > conf.maxHistory:
|
||||||
|
del self.history[0]
|
||||||
if ircutils.isUserHostmask(msg.prefix) and not msg.command == 'NICK':
|
if ircutils.isUserHostmask(msg.prefix) and not msg.command == 'NICK':
|
||||||
self.nicksToHostmasks[msg.nick] = msg.prefix
|
self.nicksToHostmasks[msg.nick] = msg.prefix
|
||||||
if msg.command == '352': # Response to a WHO command.
|
if msg.command == '352': # Response to a WHO command.
|
||||||
@ -292,6 +292,7 @@ class Irc(object):
|
|||||||
self._nickmods = copy.copy(conf.nickmods)
|
self._nickmods = copy.copy(conf.nickmods)
|
||||||
self.state.reset()
|
self.state.reset()
|
||||||
self.queue.reset()
|
self.queue.reset()
|
||||||
|
self.outstandingPings = set()
|
||||||
self.fastqueue = queue()
|
self.fastqueue = queue()
|
||||||
self.queue.enqueue(ircmsgs.user(self.user, self.ident))
|
self.queue.enqueue(ircmsgs.user(self.user, self.ident))
|
||||||
self.queue.enqueue(ircmsgs.nick(self.nick))
|
self.queue.enqueue(ircmsgs.nick(self.nick))
|
||||||
|
Loading…
Reference in New Issue
Block a user