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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user