removed some not longer needed stuff

This commit is contained in:
oy 2010-08-12 15:44:11 +02:00
parent 7503c64237
commit f494d344a9
2 changed files with 2 additions and 18 deletions

View file

@ -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 // 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) static char *SkipToBlank(char *pStr)
{ {
while(*pStr && (*pStr != ' ' && *pStr != '\t' && *pStr != '\n')) 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; pStr = pResult->m_aStringStorage;
// get command // get command
pStr = SkipBlanks(pStr); pStr = str_skip_whitespaces(pStr);
pResult->m_pCommand = pStr; pResult->m_pCommand = pStr;
pStr = SkipToBlank(pStr); pStr = SkipToBlank(pStr);
@ -91,7 +84,7 @@ int CConsole::ParseArgs(CResult *pResult, const char *pFormat)
Optional = 1; Optional = 1;
else else
{ {
pStr = SkipBlanks(pStr); pStr = str_skip_whitespaces(pStr);
if(!(*pStr)) // error, non optional command needs value if(!(*pStr)) // error, non optional command needs value
{ {

View file

@ -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_ColorBody = pMsg->m_ColorBody;
p->m_TeeInfos.m_ColorFeet = pMsg->m_ColorFeet; 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 // copy old name
char aOldName[MAX_NAME_LENGTH]; char aOldName[MAX_NAME_LENGTH];
str_copy(aOldName, Server()->ClientName(ClientId), MAX_NAME_LENGTH); str_copy(aOldName, Server()->ClientName(ClientId), MAX_NAME_LENGTH);