piqueserver / aosprotocol

Documentation and development of the protocol used by AoS 0.x, OpenSpades, pyspades and piqueserver
https://piqueserver.github.io/aosprotocol/
Apache License 2.0
26 stars 9 forks source link

PP: Kick reason #15

Closed xtreme8000 closed 8 months ago

xtreme8000 commented 6 years ago

~This might be useful for future extensions (like increasing player limit) that involve non backwards compatible changes. It would give the player a message about what exactly failed.~

~This would work by sending a ChatMessage packet before the StateData packet first, then closing the connection like usual.~

~EDIT: for voxlap this would just report back Kicked~

xtreme8000 commented 5 years ago

This now works as follows as of https://github.com/xtreme8000/BetterSpades/commit/6d792407d26a43b931ea92607b6f808a83367835:

The server is supposed to sent its custom disconnect reason a few seconds before disconnect in a ChatMessage packet with player_id=255 and type=2 (system), which will be shown when the connection is reset on the client. On clients not supporting this, it will be shown as a normal system message in chat, and the generic disconnect reason from enet payload will be shown.

NotAFile commented 5 years ago

what does the StateData refer to above? That's obsolete, right.

xtreme8000 commented 5 years ago

That's obsolete, right?

yep

xtreme8000 commented 5 years ago

assigned extID 0xC2 (194, packetless), version 1 in BetterSpades