Reset capability set state on reconnection.

This commit is contained in:
Valentin Lorentz 2019-10-25 22:40:51 +02:00
parent cfbbed3da9
commit 0014b206ad
1 changed files with 5 additions and 1 deletions

View File

@ -379,11 +379,15 @@ class IrcState(IrcCommandDispatcher, log.Firewalled):
def reset(self):
"""Resets the state to normal, unconnected state."""
self.history.reset()
self.history.resize(conf.supybot.protocols.irc.maxHistoryLength())
self.ircd = None
self.channels.clear()
self.supported.clear()
self.nicksToHostmasks.clear()
self.history.resize(conf.supybot.protocols.irc.maxHistoryLength())
self.batches = {}
self.capabilities_ack = set()
self.capabilities_nak = set()
self.capabilities_ls = set()
def __reduce__(self):
return (self.__class__, (self.history, self.supported,