Reformat project

This commit is contained in:
2022-07-21 13:40:05 +01:00
parent 6c7d0d5c45
commit f4c5323de1
44 changed files with 363 additions and 236 deletions

View File

@@ -4,8 +4,6 @@ from redis import StrictRedis
from string import digits
from os import urandom
from utils.logging.log import *
# List of errors ZNC can give us
ZNCErrors = ["Error:", "Unable to load", "does not exist", "doesn't exist"]
@@ -59,11 +57,12 @@ lastMinuteSample = 0
hashKey = urandom(16)
lastEvents = {}
# Get networks that are currently online and dedupliate
def liveNets():
networks = set()
for i in IRCPool.keys():
networks.add("".join([x for x in i if not x in digits]))
networks.add("".join([x for x in i if x not in digits]))
return networks
@@ -107,6 +106,6 @@ def initMain():
global r, g
initConf()
r = StrictRedis(
unix_socket_path=config["RedisSocket"], db=config["RedisDBEphemeral"]
unix_socket_path=config["RedisSocket"], db=config["RedisDBEphemeral"] # noqa
) # Ephemeral - flushed on quit
g = StrictRedis(unix_socket_path=config["RedisSocket"], db=config["RedisDBPersistent"]) # Persistent
g = StrictRedis(unix_socket_path=config["RedisSocket"], db=config["RedisDBPersistent"]) # noqa