summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
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)