From fd964200b23eda1276b0dbdd6bd497f1ca8cc789 Mon Sep 17 00:00:00 2001 From: jan64 Date: Wed, 3 Jun 2015 18:11:12 +0200 Subject: Changed SendAboveActionBarMessage / SendSystemMessage to be a noop for < 1.8 clients --- src/Protocol/Protocol17x.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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(); -- cgit v1.2.3