summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSkipper <[email protected]>2025-02-13 22:22:13 +0000
committerSkipper <[email protected]>2025-02-13 22:22:13 +0000
commit7e74ceff2b7d32c934fa2e42fefaee45cfab4ff9 (patch)
tree7fa4cb6775ec87cf5fba63ad41dc7f53c0c65253 /lib
parentef8f6310745a434317ba0f17875e1cb7db59e5a9 (diff)
Started to wrap FSNETCMD round YSchat
Diffstat (limited to 'lib')
-rw-r--r--lib/YSchat.py6
1 files changed, 1 insertions, 5 deletions
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)