diff options
author | tycho <work.tycho@gmail.com> | 2015-09-21 00:07:53 +0200 |
---|---|---|
committer | tycho <work.tycho@gmail.com> | 2015-09-21 13:32:56 +0200 |
commit | fd7b87741a39de10584b1b1c24982699ab3e3fab (patch) | |
tree | 6d30b3e0f16b151b50bc39a675b5b2472543a1f6 /src/ClientHandle.cpp | |
parent | Merge pull request #2487 from cuberite/sigpipe (diff) | |
download | cuberite-fd7b87741a39de10584b1b1c24982699ab3e3fab.tar cuberite-fd7b87741a39de10584b1b1c24982699ab3e3fab.tar.gz cuberite-fd7b87741a39de10584b1b1c24982699ab3e3fab.tar.bz2 cuberite-fd7b87741a39de10584b1b1c24982699ab3e3fab.tar.lz cuberite-fd7b87741a39de10584b1b1c24982699ab3e3fab.tar.xz cuberite-fd7b87741a39de10584b1b1c24982699ab3e3fab.tar.zst cuberite-fd7b87741a39de10584b1b1c24982699ab3e3fab.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()); } |