mirror of
https://github.com/RetroPortingToolKit/psxrecomp
synced 2026-10-28 02:56:36 -04:00
4a3748ce06
set_player_name only wrote the name locally, and the name reached the server exactly once, in the hello sent at connect. So renaming left the players-online list -- which is fed entirely by the server -- and the seat table showing the old name until the next reconnect. hello is the identity message, not a handshake: both clients now re-send it when the name actually changes, through one builder that json-escapes both fields (a name containing a quote used to build malformed JSON, which the server drops whole, so the rename silently never happened). The server applies it to the hub-wide row and, when the client is seated, to the seat as well -- deduplicated within that room exactly as a join is, then broadcast as lobby_update -- and hello_ok now reports the accepted name, which differs from the requested one on a collision. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V1dT6h1ZshMVUUVKTPxsCD