diff options
| author | Skipper <[email protected]> | 2025-02-13 22:22:13 +0000 |
|---|---|---|
| committer | Skipper <[email protected]> | 2025-02-13 22:22:13 +0000 |
| commit | 7e74ceff2b7d32c934fa2e42fefaee45cfab4ff9 (patch) | |
| tree | 7fa4cb6775ec87cf5fba63ad41dc7f53c0c65253 | |
| parent | ef8f6310745a434317ba0f17875e1cb7db59e5a9 (diff) | |
Started to wrap FSNETCMD round YSchat
| -rw-r--r-- | lib/YSchat.py | 6 | ||||
| -rw-r--r-- | proxy.py | 2 |
2 files changed, 2 insertions, 6 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) @@ -6,7 +6,7 @@ Lisenced under GPLv3 import asyncio from struct import unpack, pack from lib.parseFlightData import parseFlightData -from lib import YSchat, YSplayer, YSendFlight, YSundead, YSviaversion, Player, Aircraft +from lib import YSchat, YSviaversion, Player, Aircraft from lib.plugin_manager import PluginManager from lib.PacketManager.PacketManager import PacketManager from lib.PacketManager.packets import * |
