Update server.py
All checks were successful
/ check (push) Successful in 9s

This commit is contained in:
Nova Cat 2025-01-28 21:27:34 -08:00
parent 8bfd72c416
commit a444713171

View file

@ -65,8 +65,9 @@ def getident(hostt:str, clientport:int, ssll:bool):
global mods global mods
mods = {"sql_provider": None, "command": [], "allsocket": [], "identified": False, "ssl": False} mods = {"sql_provider": None, "command": [], "allsocket": [], "identified": False, "ssl": False}
with open(sys.argv[1], 'r') as file: with open(sys.argv[1], 'r') as file:
global data global data2
data = yaml.safe_load(file) data = yaml.safe_load(file)
data2 = data
try: server = data["host"] try: server = data["host"]
except: print("using fallback server address") except: print("using fallback server address")
try: displayname = data["name"] try: displayname = data["name"]
@ -307,7 +308,7 @@ def session(connection, client, ip, isssl=False):
CAPEND = True CAPEND = True
elif command == "WEBIRC" and not finished: elif command == "WEBIRC" and not finished:
try: try:
if args[0] == data["webirc_pass"]: if args[0] == data2["webirc_pass"]:
hostname = args[2] hostname = args[2]
connection.sendall(bytes(f":{server} NOTICE * :*** WebIRC detected, welcome to IRC!\r\n", "UTF-8")) connection.sendall(bytes(f":{server} NOTICE * :*** WebIRC detected, welcome to IRC!\r\n", "UTF-8"))
except: except: