From 7e74ceff2b7d32c934fa2e42fefaee45cfab4ff9 Mon Sep 17 00:00:00 2001 From: Skipper Date: Thu, 13 Feb 2025 22:22:13 +0000 Subject: Started to wrap FSNETCMD round YSchat --- lib/YSchat.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'lib') diff --git a/lib/YSchat.py b/lib/YSchat.py index d3db201..980a11b 100644 --- a/lib/YSchat.py +++ b/lib/YSchat.py @@ -1,6 +1,5 @@ from struct import pack, unpack from lib.PacketManager.packets import FSNETCMD_TEXTMESSAGE -#Re-write this to wrap the FSNETCMD_TEXTMESSAGE class def send(buffer: bytes): """ @@ -18,7 +17,4 @@ def message(msg: str): """ Generate packets for sending messages """ - decode = "l" + str(len(msg) + 2) + "s" - msg_buffer = bytes(msg, 'utf-8') - buffer = pack(decode, 0, msg_buffer) - return reply(32, buffer) + return FSNETCMD_TEXTMESSAGE.encode(msg,True) -- cgit v1.2.3