work around "player name exploit" problems caused by qizmo (happens when

someone connects to the server)
This commit is contained in:
Bill Currie 2004-05-30 22:36:34 +00:00
parent e3008841be
commit 6d329e0118
1 changed files with 1 additions and 1 deletions

View File

@ -992,7 +992,7 @@ CL_ProcessUserInfo (int slot, player_info_t *player)
}
s = Info_ValueForKey (player->userinfo, "name");
if (!*s)
if (!*s && player->userid)
Info_SetValueForKey (player->userinfo, "name", va ("user-%i [exploit]", player->userid), 1);
strncpy (player->name, Info_ValueForKey (player->userinfo, "name"),
sizeof (player->name) - 1);