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

View file

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