diff options
author | electromatter <electromatter@gmail.com> | 2015-09-22 04:44:34 +0200 |
---|---|---|
committer | electromatter <electromatter@gmail.com> | 2015-09-22 04:44:34 +0200 |
commit | a24cc0184343416eed86b208d8a2aff2b5c0892c (patch) | |
tree | 04ced91aa4a70b4c6e033fac4a2fc2e2ea206205 /src/ClientHandle.cpp | |
parent | added bungeecord support for protocol18x (diff) | |
parent | Merge pull request #2488 from cuberite/ChatFlag (diff) | |
download | cuberite-a24cc0184343416eed86b208d8a2aff2b5c0892c.tar cuberite-a24cc0184343416eed86b208d8a2aff2b5c0892c.tar.gz cuberite-a24cc0184343416eed86b208d8a2aff2b5c0892c.tar.bz2 cuberite-a24cc0184343416eed86b208d8a2aff2b5c0892c.tar.lz cuberite-a24cc0184343416eed86b208d8a2aff2b5c0892c.tar.xz cuberite-a24cc0184343416eed86b208d8a2aff2b5c0892c.tar.zst cuberite-a24cc0184343416eed86b208d8a2aff2b5c0892c.zip |
Diffstat (limited to '')
-rw-r--r-- | src/ClientHandle.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/ClientHandle.cpp b/src/ClientHandle.cpp index 679dd6a46..6c9e6a781 100644 --- a/src/ClientHandle.cpp +++ b/src/ClientHandle.cpp @@ -2086,8 +2086,9 @@ void cClientHandle::SendChat(const AString & a_Message, eMessageType a_ChatPrefi } } - AString Message = FormatMessageType(World->ShouldUseChatPrefixes(), a_ChatPrefix, a_AdditionalData); - m_Protocol->SendChat(Message.append(a_Message)); + bool ShouldUsePrefixes = World->ShouldUseChatPrefixes(); + AString Message = FormatMessageType(ShouldUsePrefixes, a_ChatPrefix, a_AdditionalData); + m_Protocol->SendChat(Message.append(a_Message), ctChatBox, ShouldUsePrefixes); } @@ -2096,7 +2097,7 @@ void cClientHandle::SendChat(const AString & a_Message, eMessageType a_ChatPrefi void cClientHandle::SendChat(const cCompositeChat & a_Message) { - m_Protocol->SendChat(a_Message); + m_Protocol->SendChat(a_Message, ctChatBox, GetPlayer()->GetWorld()->ShouldUseChatPrefixes()); } @@ -2116,7 +2117,7 @@ void cClientHandle::SendChatAboveActionBar(const AString & a_Message, eMessageTy } AString Message = FormatMessageType(World->ShouldUseChatPrefixes(), a_ChatPrefix, a_AdditionalData); - m_Protocol->SendChatAboveActionBar(Message.append(a_Message)); + m_Protocol->SendChat(Message.append(a_Message), ctAboveActionBar); } @@ -2125,7 +2126,7 @@ void cClientHandle::SendChatAboveActionBar(const AString & a_Message, eMessageTy void cClientHandle::SendChatAboveActionBar(const cCompositeChat & a_Message) { - m_Protocol->SendChatAboveActionBar(a_Message); + m_Protocol->SendChat(a_Message, ctAboveActionBar, GetPlayer()->GetWorld()->ShouldUseChatPrefixes()); } @@ -2144,8 +2145,9 @@ void cClientHandle::SendChatSystem(const AString & a_Message, eMessageType a_Cha } } - AString Message = FormatMessageType(World->ShouldUseChatPrefixes(), a_ChatPrefix, a_AdditionalData); - m_Protocol->SendChatSystem(Message.append(a_Message)); + auto ShouldUsePrefixes = World->ShouldUseChatPrefixes(); + AString Message = FormatMessageType(ShouldUsePrefixes, a_ChatPrefix, a_AdditionalData); + m_Protocol->SendChat(Message.append(a_Message), ctSystem, ShouldUsePrefixes); } @@ -2154,7 +2156,7 @@ void cClientHandle::SendChatSystem(const AString & a_Message, eMessageType a_Cha void cClientHandle::SendChatSystem(const cCompositeChat & a_Message) { - m_Protocol->SendChatSystem(a_Message); + m_Protocol->SendChat(a_Message, ctSystem, GetPlayer()->GetWorld()->ShouldUseChatPrefixes()); } |