summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/Protocol/Protocol17x.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/Protocol/Protocol17x.cpp b/src/Protocol/Protocol17x.cpp
index 71c68c071..e043698dd 100644
--- a/src/Protocol/Protocol17x.cpp
+++ b/src/Protocol/Protocol17x.cpp
@@ -302,7 +302,12 @@ void cProtocol172::SendChatAboveActionBar(const cCompositeChat & a_Message)
void cProtocol172::SendChatType(const AString & a_Message, eChatType type)
{
ASSERT(m_State == 3); // In game mode?
-
+
+ if (type != ctChatBox) // 1.7.2 doesn't support anything else
+ {
+ return;
+ }
+
cPacketizer Pkt(*this, 0x02); // Chat Message packet
Pkt.WriteString(Printf("{\"text\":\"%s\"}", EscapeString(a_Message).c_str()));
}
@@ -315,6 +320,11 @@ void cProtocol172::SendChatType(const cCompositeChat & a_Message, eChatType type
{
ASSERT(m_State == 3); // In game mode?
+ if (type != ctChatBox) // 1.7.2 doesn't support anything else
+ {
+ return;
+ }
+
cWorld * World = m_Client->GetPlayer()->GetWorld();
bool ShouldUseChatPrefixes = (World == nullptr) ? false : World->ShouldUseChatPrefixes();