Change server message seperator to \1xe, stop treating server messages like clients, they do not need to be sanitized.

This commit is contained in:
Firepup Sixfifty 2024-08-07 03:12:02 +00:00
parent f90c4f40c8
commit 9ff812a7b3
Signed by: Firepup650
SSH key fingerprint: SHA256:U0Zp8EhEe3CMqFSrC79CqatzaEiL4sjta80/RSX2XrY

View file

@ -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:])])