Index: code/game/g_cmds.c =================================================================== --- code/game/g_cmds.c (revision 1541) +++ code/game/g_cmds.c (working copy) @@ -153,29 +153,6 @@ /* ================== -SanitizeString - -Remove case and control characters -================== -*/ -void SanitizeString( char *in, char *out ) { - while ( *in ) { - if ( *in == 27 ) { - in += 2; // skip color code - continue; - } - if ( *in < 32 ) { - in++; - continue; - } - *out++ = tolower( *in++ ); - } - - *out = 0; -} - -/* -================== ClientNumberFromString Returns a player number for either a number or name string @@ -205,12 +182,14 @@ } // check for a name match - SanitizeString( s, s2 ); + Q_strncpyz(s2, s, sizeof(s2)); + Q_CleanStr(s2); for ( idnum=0,cl=level.clients ; idnum < level.maxclients ; idnum++,cl++ ) { if ( cl->pers.connected != CON_CONNECTED ) { continue; } - SanitizeString( cl->pers.netname, n2 ); + Q_strncpyz(n2, cl->pers.netname, sizeof(n2)); + Q_CleanStr(n2); if ( !strcmp( n2, s2 ) ) { return idnum; }