Whisper case-insensitive

This commit is contained in:
def 2013-08-16 00:53:24 +02:00
parent f3415c2aa5
commit a837b251ab

View file

@ -807,13 +807,13 @@ void CGameContext::OnMessage(int MsgID, CUnpacker *pUnpacker, int ClientID)
}
if(pMsg->m_pMessage[0]=='/')
{
if (pMsg->m_pMessage[1]=='w' && pMsg->m_pMessage[2]==' ')
if (str_comp_nocase_num(pMsg->m_pMessage+1, "w ", 2) == 0)
{
char pWhisperMsg[256];
str_copy(pWhisperMsg, pMsg->m_pMessage + 3, 256);
Whisper(pPlayer->GetCID(), pWhisperMsg);
}
else if (str_comp_num(pMsg->m_pMessage+1, "whisper ", 8) == 0)
else if (str_comp_nocase_num(pMsg->m_pMessage+1, "whisper ", 8) == 0)
{
char pWhisperMsg[256];
str_copy(pWhisperMsg, pMsg->m_pMessage + 9, 256);