From 9ff812a7b3c78851563393d5652bbff0e367bd4a Mon Sep 17 00:00:00 2001 From: Firepup Sixfifty Date: Wed, 7 Aug 2024 03:12:02 +0000 Subject: [PATCH] Change server message seperator to \1xe, stop treating server messages like clients, they do not need to be sanitized. --- server.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server.py b/server.py index e8b6121..09dbbe9 100755 --- a/server.py +++ b/server.py @@ -36,7 +36,7 @@ G.killList = {} G.outboundLinks = [] G.S2SLogs = [] G.cwlgd = False -G.NUL = "|" +G.NUL = "\x1e" saveLogs = True address = "::" # Try to load a message log, if one exists @@ -284,7 +284,7 @@ Please note that this is not network level statistics.\r\n""".encode( while 1: try: rawMsg = await asyncio.wait_for(reader.read(967), 0.1) - buffer = raw(rawMsg.decode("utf8")) + buffer = rawMsg.decode("utf8") match buffer[0]: case "S": # Server notice G.msgs.extend([log(buffer[2:])]) @@ -473,7 +473,7 @@ async def connectServer(hostname: str, port: int): while 1: try: rawMsg = await asyncio.wait_for(reader.read(1024), 0.1) - buffer = raw(rawMsg.decode("utf8")) + buffer = rawMsg.decode("utf8") match buffer[0]: case "S": G.msgs.extend([log(buffer[2:])])