RuneJS is a RuneScape game server written in TypeScript and JavaScript. The goal of the project is to create a comprehensive game engine, while also providing simple and easy to use content development systems and APIs.
GNU General Public License v3.0
238
stars
82
forks
source link
[BUG] Networking errors after reading chat packet #400
Describe the bug
I don't think our server reads the chat packet correctly. If you set chat to "Off" and then send a message, the chat status is set to "Hide" and packet 32 is sent immediately after the chat packet. This seems to break incoming packets.
I have used an old version of the client to rule out my recent packet changes from being the cause
To Reproduce
Steps to reproduce the behaviour:
Log into game
Send a message
Everything will continue working OK
Set chat status to "Off"
Send another message
All packets afterwards will be read incorrectly by the server
Expected behavior
Both packets (75 and 32) should be read correctly
Additional context
Both 75 and 32 are read correctly normally, the issue only occurs when 32 is automatically sent
I notice that our chat.packet uses a length of -3, this is possibly wrong because the client sends a byte indicating the length, so -1 might be more suitable
Describe the bug I don't think our server reads the chat packet correctly. If you set chat to "Off" and then send a message, the chat status is set to "Hide" and packet 32 is sent immediately after the chat packet. This seems to break incoming packets.
I have used an old version of the client to rule out my recent packet changes from being the cause
To Reproduce Steps to reproduce the behaviour:
Expected behavior Both packets (75 and 32) should be read correctly
Additional context
chat.packet
uses a length of-3
, this is possibly wrong because the client sends a byte indicating the length, so-1
might be more suitable