Reformat code

This commit is contained in:
Mark Veidemanis 2022-07-29 17:28:19 +01:00
parent 6359918639
commit d51e87b09f
2 changed files with 6 additions and 16 deletions

View File

@ -5,7 +5,6 @@ from os.path import exists
from string import digits from string import digits
from redis import StrictRedis from redis import StrictRedis
from os import getenv
# List of errors ZNC can give us # List of errors ZNC can give us
ZNCErrors = ["Error:", "Unable to load", "does not exist", "doesn't exist"] ZNCErrors = ["Error:", "Unable to load", "does not exist", "doesn't exist"]

View File

@ -1,6 +1,7 @@
#!/usr/bin/env python #!/usr/bin/env python
import sys import sys
from codecs import getwriter from codecs import getwriter
from os import getenv
from signal import SIGINT, signal from signal import SIGINT, signal
from sys import stderr, stdout from sys import stderr, stdout
@ -19,7 +20,6 @@ from core.server import ServerFactory
from utils.cleanup import handler from utils.cleanup import handler
from utils.loaders.command_loader import loadCommands from utils.loaders.command_loader import loadCommands
from utils.logging.log import log from utils.logging.log import log
from os import getenv
Factory.noisy = False Factory.noisy = False
@ -39,7 +39,7 @@ stdout = getwriter("utf8")(stdout) # this is a generic fix but we all know
stderr = getwriter("utf8")(stderr) # it's just for the retards on Rizon using stderr = getwriter("utf8")(stderr) # it's just for the retards on Rizon using
# unicode quit messages for no reason # unicode quit messages for no reason
trues = ('true', '1', 't', True) trues = ("true", "1", "t", True)
# Main listener # Main listener
listener_address = getenv("THRESHOLD_LISTENER_HOST", main.config["Listener"]["Address"]) listener_address = getenv("THRESHOLD_LISTENER_HOST", main.config["Listener"]["Address"])
@ -71,10 +71,7 @@ if __name__ == "__main__":
), ),
interface=listener_address, interface=listener_address,
) )
log( log("Threshold running with SSL on %s:%s" % (listener_address, listener_port))
"Threshold running with SSL on %s:%s"
% (listener_address, listener_port)
)
else: else:
reactor.listenTCP( reactor.listenTCP(
listener_port, listener_port,
@ -94,20 +91,14 @@ if __name__ == "__main__":
), ),
interface=relay_address, interface=relay_address,
) )
log( log("Threshold relay running with SSL on %s:%s" % (relay_address, relay_port))
"Threshold relay running with SSL on %s:%s"
% (relay_address, relay_port)
)
else: else:
reactor.listenTCP( reactor.listenTCP(
relay_port, relay_port,
relay, relay,
interface=relay_address, interface=relay_address,
) )
log( log("Threshold relay running on %s:%s" % (relay_address, relay_port))
"Threshold relay running on %s:%s"
% (relay_address, relay_port)
)
for net in main.network.keys(): for net in main.network.keys():
main.network[net].start_bots() main.network[net].start_bots()
modules.counters.setupCounterLoop() modules.counters.setupCounterLoop()