this looked dodgy
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@2642 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
5a16c2f01d
commit
8935096360
1 changed files with 5 additions and 3 deletions
|
@ -3706,19 +3706,21 @@ void SV_ExtractFromUserinfo (client_t *cl)
|
||||||
char newname[80];
|
char newname[80];
|
||||||
|
|
||||||
val = Info_ValueForKey (cl->userinfo, "team");
|
val = Info_ValueForKey (cl->userinfo, "team");
|
||||||
val[40] = 0; //trim to smallish length now (to allow for adding more.
|
|
||||||
Q_strncpyz (cl->team, val, sizeof(cl->teambuf));
|
Q_strncpyz (cl->team, val, sizeof(cl->teambuf));
|
||||||
|
|
||||||
// name for C code
|
// name for C code
|
||||||
val = Info_ValueForKey (cl->userinfo, "name");
|
val = Info_ValueForKey (cl->userinfo, "name");
|
||||||
val[40] = 0; //trim to smallish length now (to allow for adding more.
|
|
||||||
|
|
||||||
if (cl->protocol != SCP_BAD || *val)
|
if (cl->protocol != SCP_BAD || *val)
|
||||||
|
{
|
||||||
SV_FixupName(val, newname);
|
SV_FixupName(val, newname);
|
||||||
|
if (strlen(newname) > 40)
|
||||||
|
newname[40] = 0;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
newname[0] = 0;
|
newname[0] = 0;
|
||||||
|
|
||||||
if (!val[0] && cl->protocol != SCP_BAD)
|
if (!newname[0] && cl->protocol != SCP_BAD)
|
||||||
strcpy(newname, "Hidden");
|
strcpy(newname, "Hidden");
|
||||||
else if (!stricmp(val, "console"))
|
else if (!stricmp(val, "console"))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue