Fix a race condition in disabling networks post-creation, remove redundant bindhost code and fix a minor bug in the load command

This commit is contained in:
2019-03-16 17:05:16 +00:00
parent a4b7bd50b1
commit 488d81dac8
4 changed files with 18 additions and 25 deletions

View File

@@ -16,23 +16,12 @@ def startBot(name):
certFN = main.certPath+main.config["Certificate"]
contextFactory = DefaultOpenSSLContextFactory(keyFN.encode("utf-8", "replace"),
certFN.encode("utf-8", "replace"))
if "bind" in main.relay[relay].keys():
bot = IRCBotFactory(name)
rct = reactor.connectSSL(host,
port,
bot, contextFactory,
bindAddress=main.relay[relay]["bind"])
bot = IRCBotFactory(name)
rct = reactor.connectSSL(host,
port,
bot, contextFactory)
main.ReactorPool[name] = rct
main.FactoryPool[name] = bot
return
else:
bot = IRCBotFactory(name)
rct = reactor.connectSSL(host,
port,
bot, contextFactory)
main.ReactorPool[name] = rct
main.FactoryPool[name] = bot
return
main.ReactorPool[name] = rct
main.FactoryPool[name] = bot
return