Change server message seperator to \1xe, stop treating server messages like clients, they do not need to be sanitized.
This commit is contained in:
parent
f90c4f40c8
commit
9ff812a7b3
1 changed files with 3 additions and 3 deletions
|
@ -36,7 +36,7 @@ G.killList = {}
|
||||||
G.outboundLinks = []
|
G.outboundLinks = []
|
||||||
G.S2SLogs = []
|
G.S2SLogs = []
|
||||||
G.cwlgd = False
|
G.cwlgd = False
|
||||||
G.NUL = "|"
|
G.NUL = "\x1e"
|
||||||
saveLogs = True
|
saveLogs = True
|
||||||
address = "::"
|
address = "::"
|
||||||
# Try to load a message log, if one exists
|
# 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:
|
while 1:
|
||||||
try:
|
try:
|
||||||
rawMsg = await asyncio.wait_for(reader.read(967), 0.1)
|
rawMsg = await asyncio.wait_for(reader.read(967), 0.1)
|
||||||
buffer = raw(rawMsg.decode("utf8"))
|
buffer = rawMsg.decode("utf8")
|
||||||
match buffer[0]:
|
match buffer[0]:
|
||||||
case "S": # Server notice
|
case "S": # Server notice
|
||||||
G.msgs.extend([log(buffer[2:])])
|
G.msgs.extend([log(buffer[2:])])
|
||||||
|
@ -473,7 +473,7 @@ async def connectServer(hostname: str, port: int):
|
||||||
while 1:
|
while 1:
|
||||||
try:
|
try:
|
||||||
rawMsg = await asyncio.wait_for(reader.read(1024), 0.1)
|
rawMsg = await asyncio.wait_for(reader.read(1024), 0.1)
|
||||||
buffer = raw(rawMsg.decode("utf8"))
|
buffer = rawMsg.decode("utf8")
|
||||||
match buffer[0]:
|
match buffer[0]:
|
||||||
case "S":
|
case "S":
|
||||||
G.msgs.extend([log(buffer[2:])])
|
G.msgs.extend([log(buffer[2:])])
|
||||||
|
|
Loading…
Reference in a new issue