feat(kick-system): add translated kick reasons with error codes

- Add kickReason field to ServerErrorMessage schema with enum values
- Display translated kick messages instead of generic "Kicked from game"
- Include error codes (KICK_ADMIN, KICK_MULTI_TAB, KICK_LOBBY_CREATOR) for debugging
- Update kick handlers in GameServer, PostJoinHandler, and Worker to pass reasons
- Modify showErrorModal to handle kick-specific formatting without duplication
This commit is contained in:
floriankilian
2025-08-14 22:15:32 +02:00
parent 2ed0cef65c
commit e1b1beb24d
6 changed files with 64 additions and 24 deletions
+1 -1
View File
@@ -294,7 +294,7 @@ export async function startWorker() {
return;
}
game.kickClient(clientID);
game.kickClient(clientID, "kick_admin");
res.status(200).send("Player kicked successfully");
}),
);