mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Support uppercase commands for /r and /w
This commit is contained in:
parent
744fafcbd0
commit
252110a66b
|
@ -1256,11 +1256,11 @@ void CGameContext::OnClientEnter(int ClientID)
|
||||||
for(const IConsole::CCommandInfo *pCmd = Console()->FirstCommandInfo(IConsole::ACCESS_LEVEL_USER, CFGFLAG_CHAT);
|
for(const IConsole::CCommandInfo *pCmd = Console()->FirstCommandInfo(IConsole::ACCESS_LEVEL_USER, CFGFLAG_CHAT);
|
||||||
pCmd; pCmd = pCmd->NextCommandInfo(IConsole::ACCESS_LEVEL_USER, CFGFLAG_CHAT))
|
pCmd; pCmd = pCmd->NextCommandInfo(IConsole::ACCESS_LEVEL_USER, CFGFLAG_CHAT))
|
||||||
{
|
{
|
||||||
if(!str_comp(pCmd->m_pName, "w") || !str_comp(pCmd->m_pName, "whisper"))
|
if(!str_comp_nocase(pCmd->m_pName, "w") || !str_comp_nocase(pCmd->m_pName, "whisper"))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
const char *pName = pCmd->m_pName;
|
const char *pName = pCmd->m_pName;
|
||||||
if(!str_comp(pCmd->m_pName, "r"))
|
if(!str_comp_nocase(pCmd->m_pName, "r"))
|
||||||
pName = "rescue";
|
pName = "rescue";
|
||||||
|
|
||||||
protocol7::CNetMsg_Sv_CommandInfo Msg;
|
protocol7::CNetMsg_Sv_CommandInfo Msg;
|
||||||
|
@ -2104,7 +2104,7 @@ void CGameContext::OnMessage(int MsgID, CUnpacker *pUnpacker, int ClientID)
|
||||||
m_VoteVictim = SpectateID;
|
m_VoteVictim = SpectateID;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(aCmd[0] && str_comp(aCmd, "info") != 0)
|
if(aCmd[0] && str_comp_nocase(aCmd, "info") != 0)
|
||||||
CallVote(ClientID, aDesc, aCmd, aReason, aChatmsg, aSixupDesc[0] ? aSixupDesc : 0);
|
CallVote(ClientID, aDesc, aCmd, aReason, aChatmsg, aSixupDesc[0] ? aSixupDesc : 0);
|
||||||
}
|
}
|
||||||
else if(MsgID == NETMSGTYPE_CL_VOTE)
|
else if(MsgID == NETMSGTYPE_CL_VOTE)
|
||||||
|
|
Loading…
Reference in a new issue