summaryrefslogtreecommitdiffstats
path: root/src/Protocol
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-09-17 09:38:06 +0200
committermadmaxoft <github@xoft.cz>2014-09-17 09:38:06 +0200
commit3406957f1b4b6b49c1b571dcceb2b463def9e4c3 (patch)
treed7f755d903cb372a796473f1a82299fd00521688 /src/Protocol
parentVoronoiMap: Added Jitter and OddRowOffset params. (diff)
downloadcuberite-3406957f1b4b6b49c1b571dcceb2b463def9e4c3.tar
cuberite-3406957f1b4b6b49c1b571dcceb2b463def9e4c3.tar.gz
cuberite-3406957f1b4b6b49c1b571dcceb2b463def9e4c3.tar.bz2
cuberite-3406957f1b4b6b49c1b571dcceb2b463def9e4c3.tar.lz
cuberite-3406957f1b4b6b49c1b571dcceb2b463def9e4c3.tar.xz
cuberite-3406957f1b4b6b49c1b571dcceb2b463def9e4c3.tar.zst
cuberite-3406957f1b4b6b49c1b571dcceb2b463def9e4c3.zip
Diffstat (limited to 'src/Protocol')
-rw-r--r--src/Protocol/Protocol17x.cpp9
-rw-r--r--src/Protocol/ProtocolRecognizer.cpp2
2 files changed, 10 insertions, 1 deletions
diff --git a/src/Protocol/Protocol17x.cpp b/src/Protocol/Protocol17x.cpp
index f07f6a928..9ebb6b4b0 100644
--- a/src/Protocol/Protocol17x.cpp
+++ b/src/Protocol/Protocol17x.cpp
@@ -100,6 +100,15 @@ cProtocol172::cProtocol172(cClientHandle * a_Client, const AString & a_ServerAdd
m_IsEncrypted(false),
m_LastSentDimension(dimNotSet)
{
+ // BungeeCord handling:
+ // If BC is setup with ip_forward == true, it sends additional data in the login packet's ServerAddress field:
+ // hostname\00ip-address\00uuid\00profile-properties-as-json
+ AStringVector Params;
+ if (SplitZeroTerminatedStrings(a_ServerAddress, Params) && (Params.size() == 4))
+ {
+ m_ServerAddress = Params[0];
+ }
+
// Create the comm log file, if so requested:
if (g_ShouldLogCommIn || g_ShouldLogCommOut)
{
diff --git a/src/Protocol/ProtocolRecognizer.cpp b/src/Protocol/ProtocolRecognizer.cpp
index 8b395230a..d836291c3 100644
--- a/src/Protocol/ProtocolRecognizer.cpp
+++ b/src/Protocol/ProtocolRecognizer.cpp
@@ -27,7 +27,7 @@
cProtocolRecognizer::cProtocolRecognizer(cClientHandle * a_Client) :
super(a_Client),
m_Protocol(NULL),
- m_Buffer(512)
+ m_Buffer(8192) // We need a larger buffer to support BungeeCord - it sends one huge packet at the start
{
}