diff options
author | Howaner <franzi.moos@googlemail.com> | 2014-09-19 17:33:22 +0200 |
---|---|---|
committer | Howaner <franzi.moos@googlemail.com> | 2014-09-19 17:33:22 +0200 |
commit | 09ca7d144afaa4c3fb7727390d11a10c3a29d98e (patch) | |
tree | 4dadccef8ed72f8954b8d079f901709b578f6171 /src/Protocol/Protocol17x.cpp | |
parent | Created MobSpawnerEntity class. (diff) | |
parent | QtBiomeVisualiser: More gcc fixes. (diff) | |
download | cuberite-09ca7d144afaa4c3fb7727390d11a10c3a29d98e.tar cuberite-09ca7d144afaa4c3fb7727390d11a10c3a29d98e.tar.gz cuberite-09ca7d144afaa4c3fb7727390d11a10c3a29d98e.tar.bz2 cuberite-09ca7d144afaa4c3fb7727390d11a10c3a29d98e.tar.lz cuberite-09ca7d144afaa4c3fb7727390d11a10c3a29d98e.tar.xz cuberite-09ca7d144afaa4c3fb7727390d11a10c3a29d98e.tar.zst cuberite-09ca7d144afaa4c3fb7727390d11a10c3a29d98e.zip |
Diffstat (limited to 'src/Protocol/Protocol17x.cpp')
-rw-r--r-- | src/Protocol/Protocol17x.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/Protocol/Protocol17x.cpp b/src/Protocol/Protocol17x.cpp index f07f6a928..7d80e79fb 100644 --- a/src/Protocol/Protocol17x.cpp +++ b/src/Protocol/Protocol17x.cpp @@ -100,6 +100,19 @@ 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 (cRoot::Get()->GetServer()->ShouldAllowBungeeCord() && SplitZeroTerminatedStrings(a_ServerAddress, Params) && (Params.size() == 4)) + { + LOGD("Player at %s connected via BungeeCord", Params[1].c_str()); + m_ServerAddress = Params[0]; + m_Client->SetIPString(Params[1]); + m_Client->SetUUID(cMojangAPI::MakeUUIDShort(Params[2])); + m_Client->SetProperties(Params[3]); + } + // Create the comm log file, if so requested: if (g_ShouldLogCommIn || g_ShouldLogCommOut) { |