Packet filtering for those who never finish the handshake

This also kicks those who never finish handshaking upon chat now. (To free up the resources a bit I guess?)

Before a player finishes the connection handshake, the server will check if it's necessary to send them a packet - it checks against a list of necessary packets like:

- ContinueConnecting (Send User Slot),
- PlayerSpawnSelf (CompleteConnectionAndSpawn),
- WorldInfo (Which the server does a further check if the player is at the appropriate state to be sent the world info)
- Status
- Disconnection
- TileFrameSection & TileSendSection
This commit is contained in:
ohayo 2025-02-04 11:07:10 +10:00
parent b5d546a660
commit 52d1840003
2 changed files with 29 additions and 0 deletions

View file

@ -1494,6 +1494,7 @@ namespace TShockAPI
if (!tsplr.FinishedHandshake)
{
tsplr.Kick(GetString("Your client didn't finish the handshake."), true);
args.Handled = true;
return;
}