You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

51 lines
1.4 KiB
Plaintext

#!/usr/bin/env python
from twisted.internet import reactor
from twisted.internet.ssl import DefaultOpenSSLContextFactory
#from twisted.python import log
#from sys import stdout
#log.startLogging(stdout)
from core.main import (
configPath,
certPath,
connections,
IRCPool,
ReactorPool,
FactoryPool,
MonitorPool,
saveConf,
loadConf,
initMain,
)
initMain()
from core.main import (
config,
keyconf,
pool,
help,
wholist,
counters,
)
from utils.logging.log import *
import modules.userinfo as userinfo
import core.helper as helper
from core.server import Server, ServerFactory
if __name__ == "__main__":
listener = ServerFactory()
if config["Listener"]["UseSSL"] == True:
reactor.listenSSL(config["Listener"]["Port"], listener, DefaultOpenSSLContextFactory(certPath+config["Listener"]["Key"], certPath+config["Listener"]["Certificate"]), interface=config["Listener"]["Address"])
log("Threshold running with SSL on %s:%s" % (config["Listener"]["Address"], config["Listener"]["Port"]))
else:
reactor.listenTCP(config["Listener"]["Port"], listener, interface=config["Listener"]["Address"])
log("Threshold running on %s:%s" % (config["Listener"]["Address"], config["Listener"]["Port"]))
for i in pool.keys():
if pool[i]["enabled"] == True:
helper.addBot(i)
reactor.run()