diff --git a/src/engine/shared/console.cpp b/src/engine/shared/console.cpp index a6cf4d0bd..367e7e87c 100644 --- a/src/engine/shared/console.cpp +++ b/src/engine/shared/console.cpp @@ -29,13 +29,6 @@ float CConsole::CResult::GetFloat(unsigned Index) } // the maximum number of tokens occurs in a string of length CONSOLE_MAX_STR_LENGTH with tokens size 1 separated by single spaces -static char *SkipBlanks(char *pStr) -{ - while(*pStr && (*pStr == ' ' || *pStr == '\t' || *pStr == '\n')) - pStr++; - return pStr; -} - static char *SkipToBlank(char *pStr) { while(*pStr && (*pStr != ' ' && *pStr != '\t' && *pStr != '\n')) @@ -55,7 +48,7 @@ int CConsole::ParseStart(CResult *pResult, const char *pString, int Length) pStr = pResult->m_aStringStorage; // get command - pStr = SkipBlanks(pStr); + pStr = str_skip_whitespaces(pStr); pResult->m_pCommand = pStr; pStr = SkipToBlank(pStr); @@ -91,7 +84,7 @@ int CConsole::ParseArgs(CResult *pResult, const char *pFormat) Optional = 1; else { - pStr = SkipBlanks(pStr); + pStr = str_skip_whitespaces(pStr); if(!(*pStr)) // error, non optional command needs value { diff --git a/src/game/server/gamecontext.cpp b/src/game/server/gamecontext.cpp index 8b8db59ac..3f7a5b141 100644 --- a/src/game/server/gamecontext.cpp +++ b/src/game/server/gamecontext.cpp @@ -746,15 +746,6 @@ void CGameContext::OnMessage(int MsgId, CUnpacker *pUnpacker, int ClientId) p->m_TeeInfos.m_ColorBody = pMsg->m_ColorBody; p->m_TeeInfos.m_ColorFeet = pMsg->m_ColorFeet; - // check for invalid chars - unsigned char *pName = (unsigned char *)pMsg->m_pName; - while (*pName) - { - if(*pName < 32) - *pName = ' '; - pName++; - } - // copy old name char aOldName[MAX_NAME_LENGTH]; str_copy(aOldName, Server()->ClientName(ClientId), MAX_NAME_LENGTH);