Regression: Don't connnect if a server's 'connect' setting is false

This commit is contained in:
Evelyn 2018-11-24 12:14:36 +00:00
parent d606944648
commit 8cd7393d17
2 changed files with 2 additions and 2 deletions

View file

@ -47,7 +47,7 @@ class Bot(object):
connection_params.id, connection_params.alias, connection_params) connection_params.id, connection_params.alias, connection_params)
self._events.on("new.server").call(server=new_server) self._events.on("new.server").call(server=new_server)
if not connect or not new_server.get_setting("connect", True): if not connect:
return new_server return new_server
self.connect(new_server) self.connect(new_server)

View file

@ -58,7 +58,7 @@ if len(server_configs):
servers = [] servers = []
for server_id, alias in server_configs: for server_id, alias in server_configs:
server = bot.add_server(server_id, connect=False) server = bot.add_server(server_id, connect=False)
if not server == None: if not server == None and server.get_setting("connect", True):
servers.append(server) servers.append(server)
bot._events.on("boot.done").call() bot._events.on("boot.done").call()