From 8935096360c81e3391da31c1ade01c3b77ef1c3a Mon Sep 17 00:00:00 2001 From: Spoike Date: Sat, 8 Sep 2007 20:28:59 +0000 Subject: [PATCH] this looked dodgy git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@2642 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/server/sv_main.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/engine/server/sv_main.c b/engine/server/sv_main.c index 68e1dd79c..06f23f84d 100644 --- a/engine/server/sv_main.c +++ b/engine/server/sv_main.c @@ -3706,19 +3706,21 @@ void SV_ExtractFromUserinfo (client_t *cl) char newname[80]; 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)); // name for C code 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) + { SV_FixupName(val, newname); + if (strlen(newname) > 40) + newname[40] = 0; + } else newname[0] = 0; - if (!val[0] && cl->protocol != SCP_BAD) + if (!newname[0] && cl->protocol != SCP_BAD) strcpy(newname, "Hidden"); else if (!stricmp(val, "console")) {