summaryrefslogtreecommitdiffstats
path: root/src/Protocol/ProtocolRecognizer.cpp
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-04-14 18:52:21 +0200
committermadmaxoft <github@xoft.cz>2014-04-14 18:52:21 +0200
commit0f55dcf036381f951fb22219158182729453f841 (patch)
tree7de5e16f5821b32d4a2394d5028a46891a65efb6 /src/Protocol/ProtocolRecognizer.cpp
parentProtoProxy: Fixed weird gcc compilation errors. (diff)
downloadcuberite-0f55dcf036381f951fb22219158182729453f841.tar
cuberite-0f55dcf036381f951fb22219158182729453f841.tar.gz
cuberite-0f55dcf036381f951fb22219158182729453f841.tar.bz2
cuberite-0f55dcf036381f951fb22219158182729453f841.tar.lz
cuberite-0f55dcf036381f951fb22219158182729453f841.tar.xz
cuberite-0f55dcf036381f951fb22219158182729453f841.tar.zst
cuberite-0f55dcf036381f951fb22219158182729453f841.zip
Diffstat (limited to '')
-rw-r--r--src/Protocol/ProtocolRecognizer.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/Protocol/ProtocolRecognizer.cpp b/src/Protocol/ProtocolRecognizer.cpp
index 3f7d7b254..6a1f2fbbd 100644
--- a/src/Protocol/ProtocolRecognizer.cpp
+++ b/src/Protocol/ProtocolRecognizer.cpp
@@ -59,6 +59,7 @@ AString cProtocolRecognizer::GetVersionTextFromInt(int a_ProtocolVersion)
case PROTO_VERSION_1_6_3: return "1.6.3";
case PROTO_VERSION_1_6_4: return "1.6.4";
case PROTO_VERSION_1_7_2: return "1.7.2";
+ case PROTO_VERSION_1_7_6: return "1.7.6";
}
ASSERT(!"Unknown protocol version");
return Printf("Unknown protocol (%d)", a_ProtocolVersion);
@@ -965,6 +966,18 @@ bool cProtocolRecognizer::TryRecognizeLengthedProtocol(UInt32 a_PacketLengthRema
m_Protocol = new cProtocol172(m_Client, ServerAddress, (UInt16)ServerPort, NextState);
return true;
}
+ case PROTO_VERSION_1_7_6:
+ {
+ AString ServerAddress;
+ short ServerPort;
+ UInt32 NextState;
+ m_Buffer.ReadVarUTF8String(ServerAddress);
+ m_Buffer.ReadBEShort(ServerPort);
+ m_Buffer.ReadVarInt(NextState);
+ m_Buffer.CommitRead();
+ m_Protocol = new cProtocol176(m_Client, ServerAddress, (UInt16)ServerPort, NextState);
+ return true;
+ }
}
LOGINFO("Client \"%s\" uses an unsupported protocol (lengthed, version %u)",
m_Client->GetIPString().c_str(), ProtocolVersion