Rename CChat::Say to CChat::SendChat

Follows the convention set by the other methods that send network packets.
This commit is contained in:
ChillerDragon 2024-05-06 09:23:05 +08:00
parent 5586961b4c
commit 33baeb8f28
3 changed files with 8 additions and 8 deletions

View file

@ -150,12 +150,12 @@ void CChat::OnStateChange(int NewState, int OldState)
void CChat::ConSay(IConsole::IResult *pResult, void *pUserData)
{
((CChat *)pUserData)->Say(0, pResult->GetString(0));
((CChat *)pUserData)->SendChat(0, pResult->GetString(0));
}
void CChat::ConSayTeam(IConsole::IResult *pResult, void *pUserData)
{
((CChat *)pUserData)->Say(1, pResult->GetString(0));
((CChat *)pUserData)->SendChat(1, pResult->GetString(0));
}
void CChat::ConChat(IConsole::IResult *pResult, void *pUserData)
@ -255,7 +255,7 @@ bool CChat::OnInput(const IInput::CEvent &Event)
if(m_LastChatSend + time_freq() < time())
{
Say(m_Mode == MODE_ALL ? 0 : 1, m_Input.GetString());
SendChat(m_Mode == MODE_ALL ? 0 : 1, m_Input.GetString());
AddEntry = true;
}
else if(m_PendingChatCounter < 3)
@ -1177,7 +1177,7 @@ void CChat::OnRender()
{
if(i == 0)
{
Say(pEntry->m_Team, pEntry->m_aText);
SendChat(pEntry->m_Team, pEntry->m_aText);
break;
}
}
@ -1324,7 +1324,7 @@ void CChat::OnRender()
}
}
void CChat::Say(int Team, const char *pLine)
void CChat::SendChat(int Team, const char *pLine)
{
// don't send empty messages
if(*str_utf8_skip_whitespaces(pLine) == '\0')
@ -1348,7 +1348,7 @@ void CChat::SayChat(const char *pLine)
if(m_LastChatSend + time_freq() < time())
{
Say(m_Mode == MODE_ALL ? 0 : 1, pLine);
SendChat(m_Mode == MODE_ALL ? 0 : 1, pLine);
AddEntry = true;
}
else if(m_PendingChatCounter < 3)

View file

@ -155,7 +155,7 @@ public:
void AddLine(int ClientId, int Team, const char *pLine);
void EnableMode(int Team);
void DisableMode();
void Say(int Team, const char *pLine);
void SendChat(int Team, const char *pLine);
void SayChat(const char *pLine);
void RegisterCommand(const char *pName, const char *pParams, const char *pHelpText);
void UnregisterCommand(const char *pName);

View file

@ -203,5 +203,5 @@ void CEmoticon::EyeEmote(int Emote)
str_format(aBuf, sizeof(aBuf), "/emote blink %d", g_Config.m_ClEyeDuration);
break;
}
GameClient()->m_Chat.Say(0, aBuf);
GameClient()->m_Chat.SendChat(0, aBuf);
}