remove instead of set "" info keys for localinfo

This commit is contained in:
Bill Currie 2001-11-05 02:03:37 +00:00
parent 9829cf3993
commit ac93a620d7
2 changed files with 10 additions and 3 deletions

View file

@ -901,8 +901,11 @@ SV_Localinfo_f (void)
SV_Printf ("Star variables cannot be changed.\n");
return;
}
Info_SetValueForKey (localinfo, Cmd_Argv (1), Cmd_Argv (2),
!sv_highchars->int_val);
if (*Cmd_Argv (2))
Info_SetValueForKey (localinfo, Cmd_Argv (1), Cmd_Argv (2),
!sv_highchars->int_val);
else
Info_RemoveKey (localinfo, Cmd_Argv (1));
}
/*

View file

@ -1361,7 +1361,11 @@ PF_setinfokey (progs_t *pr)
net_svc_setinfo_t block;
if (e1 == 0) {
Info_SetValueForKey (localinfo, key, value, !sv_highchars->int_val);
if (*value)
Info_SetValueForKey (localinfo, key, value,
!sv_highchars->int_val);
else
Info_RemoveKey (localinfo, key);
} else if (e1 <= MAX_CLIENTS) {
Info_SetValueForKey (svs.clients[e1 - 1].userinfo, key, value,
!sv_highchars->int_val);