RegConsoleCmd is now case insensitive for client-only commands (bug 3602, r=ds).
This commit is contained in:
parent
a017e4820a
commit
6048144310
@ -229,8 +229,29 @@ void ConCmdManager::SetCommandClient(int client)
|
|||||||
ResultType ConCmdManager::DispatchClientCommand(int client, const char *cmd, int args, ResultType type)
|
ResultType ConCmdManager::DispatchClientCommand(int client, const char *cmd, int args, ResultType type)
|
||||||
{
|
{
|
||||||
ConCmdInfo *pInfo;
|
ConCmdInfo *pInfo;
|
||||||
if (sm_trie_retrieve(m_pCmds, cmd, (void **)&pInfo))
|
|
||||||
|
if (!sm_trie_retrieve(m_pCmds, cmd, (void **)&pInfo))
|
||||||
{
|
{
|
||||||
|
List<ConCmdInfo *>::iterator iter;
|
||||||
|
|
||||||
|
pInfo = NULL;
|
||||||
|
iter = m_CmdList.begin();
|
||||||
|
while (iter != m_CmdList.end())
|
||||||
|
{
|
||||||
|
if (strcasecmp((*iter)->pCmd->GetName(), cmd) == 0)
|
||||||
|
{
|
||||||
|
pInfo = (*iter);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
iter++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (pInfo == NULL)
|
||||||
|
{
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
cell_t result = type;
|
cell_t result = type;
|
||||||
cell_t tempres = result;
|
cell_t tempres = result;
|
||||||
List<CmdHook *>::iterator iter;
|
List<CmdHook *>::iterator iter;
|
||||||
@ -266,8 +287,8 @@ ResultType ConCmdManager::DispatchClientCommand(int client, const char *cmd, int
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
type = (ResultType)result;
|
type = (ResultType)result;
|
||||||
}
|
|
||||||
|
|
||||||
return type;
|
return type;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user