Tell servers objects when they are the result of a reconnection

This commit is contained in:
jesopo 2019-06-17 13:53:17 +01:00
parent ec733e200c
commit dbe0b1f43b
2 changed files with 2 additions and 0 deletions

View file

@ -229,6 +229,7 @@ class Bot(object):
connection_params).args
server = self.add_server(server_id, False, args)
server.reconnected = True
if self.connect(server):
self.servers[server.fileno()] = server
return True

View file

@ -18,6 +18,7 @@ class Server(IRCObject.Object):
self.alias = alias
self.connection_params = connection_params
self.connected = False
self.reconnected = False
self.name = None # type: typing.Optional[str]
self.version = None # type: typing.Optional[str]