diff options
| author | oy <Tom_Adams@web.de> | 2011-01-19 15:39:04 +0100 |
|---|---|---|
| committer | oy <Tom_Adams@web.de> | 2011-01-19 15:39:04 +0100 |
| commit | 7a20c313ee83de1619d329fd8ba0b6138a7eb4bc (patch) | |
| tree | 2ae228151f8a49e6e68d42b8620747409e900b65 /src/engine/server | |
| parent | 1359db54763739d65895d9fe48c13de95570bbe5 (diff) | |
| download | zcatch-7a20c313ee83de1619d329fd8ba0b6138a7eb4bc.tar.gz zcatch-7a20c313ee83de1619d329fd8ba0b6138a7eb4bc.zip | |
made some output just show up on debug
Diffstat (limited to 'src/engine/server')
| -rw-r--r-- | src/engine/server/server.cpp | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/src/engine/server/server.cpp b/src/engine/server/server.cpp index 299919dd..95cb06bd 100644 --- a/src/engine/server/server.cpp +++ b/src/engine/server/server.cpp @@ -845,22 +845,24 @@ void CServer::ProcessClientPacket(CNetChunk *pPacket) } else { - char aHex[] = "0123456789ABCDEF"; - char aBuf[512]; - - for(int b = 0; b < pPacket->m_DataSize && b < 32; b++) + if(g_Config.m_Debug) { - aBuf[b*3] = aHex[((const unsigned char *)pPacket->m_pData)[b]>>4]; - aBuf[b*3+1] = aHex[((const unsigned char *)pPacket->m_pData)[b]&0xf]; - aBuf[b*3+2] = ' '; - aBuf[b*3+3] = 0; - } + char aHex[] = "0123456789ABCDEF"; + char aBuf[512]; - char aBufMsg[256]; - str_format(aBufMsg, sizeof(aBufMsg), "strange message ClientId=%d msg=%d data_size=%d", ClientId, Msg, pPacket->m_DataSize); - Console()->Print(IConsole::OUTPUT_LEVEL_ADDINFO, "server", aBufMsg); - Console()->Print(IConsole::OUTPUT_LEVEL_ADDINFO, "server", aBuf); - + for(int b = 0; b < pPacket->m_DataSize && b < 32; b++) + { + aBuf[b*3] = aHex[((const unsigned char *)pPacket->m_pData)[b]>>4]; + aBuf[b*3+1] = aHex[((const unsigned char *)pPacket->m_pData)[b]&0xf]; + aBuf[b*3+2] = ' '; + aBuf[b*3+3] = 0; + } + + char aBufMsg[256]; + str_format(aBufMsg, sizeof(aBufMsg), "strange message ClientId=%d msg=%d data_size=%d", ClientId, Msg, pPacket->m_DataSize); + Console()->Print(IConsole::OUTPUT_LEVEL_DEBUG, "server", aBufMsg); + Console()->Print(IConsole::OUTPUT_LEVEL_DEBUG, "server", aBuf); + } } } else |