mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Enhanced CMDList but still this causes too weak connection (out of buffer) need to think of a better way
This commit is contained in:
parent
5cf469fa11
commit
e9523454f1
|
@ -618,13 +618,16 @@ void CConsole::List(const int Level, int Flags)
|
||||||
while(pCommand)
|
while(pCommand)
|
||||||
{
|
{
|
||||||
if(pCommand)
|
if(pCommand)
|
||||||
if(pCommand->m_Level <= Level && pCommand->m_Flags&Flags)
|
if(pCommand->m_Level <= Level && (!Flags)?true:pCommand->m_Flags&Flags)
|
||||||
{
|
{
|
||||||
char aBuf[128];
|
char aBuf[128];
|
||||||
str_format(aBuf,sizeof(aBuf),"%s, %s, %s",pCommand->m_pName, pCommand->m_pParams, pCommand->m_pHelp);
|
str_format(aBuf,sizeof(aBuf),"Name: %s, Parameters: %s, Help: %s",pCommand->m_pName, (!str_length(pCommand->m_pParams))?"None.":pCommand->m_pParams, (!str_length(pCommand->m_pHelp))?"No Help String Given":pCommand->m_pHelp);
|
||||||
PrintResponse(IConsole::OUTPUT_LEVEL_STANDARD, "Console", aBuf);
|
PrintResponse(IConsole::OUTPUT_LEVEL_STANDARD, "Console", aBuf);
|
||||||
|
for (int var = 0; var < 500; ++var)
|
||||||
|
{
|
||||||
|
;//do nothing
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pCommand = pCommand->m_pNext;
|
pCommand = pCommand->m_pNext;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1987,12 +1987,12 @@ void CGameContext::ConHelp(IConsole::IResult *pResult, void *pUserData, int Clie
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
const char *pArg = pResult->GetString(0);
|
const char *pArg = pResult->GetString(0);
|
||||||
IConsole::CCommandInfo *pCmdInfo = pSelf->Console()->GetCommandInfo(pArg, CFGFLAG_SERVER);
|
IConsole::CCommandInfo *pCmdInfo = pSelf->Console()->GetCommandInfo(pArg, CFGFLAG_SERVER);
|
||||||
if(pCmdInfo && pCmdInfo->m_pHelp)
|
if(pCmdInfo && pCmdInfo->m_pHelp)
|
||||||
pSelf->Console()->PrintResponse(IConsole::OUTPUT_LEVEL_STANDARD, "info", pCmdInfo->m_pHelp);
|
pSelf->Console()->PrintResponse(IConsole::OUTPUT_LEVEL_STANDARD, "info", pCmdInfo->m_pHelp);
|
||||||
else
|
else
|
||||||
pSelf->Console()->PrintResponse(IConsole::OUTPUT_LEVEL_STANDARD, "info", "Command is either unknown or you havent given the blank command without any parameters.");
|
pSelf->Console()->PrintResponse(IConsole::OUTPUT_LEVEL_STANDARD, "info", "Command is either unknown or you have given a blank command without any parameters.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue