kick players that send illegal restat commands
This commit is contained in:
parent
d7ab39bc4e
commit
9411c90b79
1 changed files with 8 additions and 0 deletions
|
|
@ -2450,6 +2450,14 @@ static void Got_WeaponPref(UINT8 **cp,INT32 playernum)
|
|||
}
|
||||
UINT8 kartspeedrestat = READUINT8(*cp);
|
||||
UINT8 kartweightrestat = READUINT8(*cp);
|
||||
if (kartspeedrestat < 0 || kartspeedrestat > 9 ||
|
||||
kartweightrestat < 0 || kartweightrestat > 9)
|
||||
{
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Illegal restat values received from %s\n"), player_names[playernum]);
|
||||
if (server)
|
||||
SendKick(playernum, KICK_MSG_CON_FAIL);
|
||||
return;
|
||||
}
|
||||
player->kartspeedrestat = kartspeedrestat;
|
||||
player->kartweightrestat = kartweightrestat;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue