summaryrefslogtreecommitdiffstats
path: root/src/Protocol/Authenticator.cpp
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-07-30 13:52:51 +0200
committermadmaxoft <github@xoft.cz>2014-07-30 13:56:30 +0200
commit17a94b16ea6207fd5f38fbd309b4db0d92de0d31 (patch)
tree0109cd55e8cfa6058255d2fa82dfaa0d3c7e4bd2 /src/Protocol/Authenticator.cpp
parentExported cMojangAPI to Lua. (diff)
downloadcuberite-17a94b16ea6207fd5f38fbd309b4db0d92de0d31.tar
cuberite-17a94b16ea6207fd5f38fbd309b4db0d92de0d31.tar.gz
cuberite-17a94b16ea6207fd5f38fbd309b4db0d92de0d31.tar.bz2
cuberite-17a94b16ea6207fd5f38fbd309b4db0d92de0d31.tar.lz
cuberite-17a94b16ea6207fd5f38fbd309b4db0d92de0d31.tar.xz
cuberite-17a94b16ea6207fd5f38fbd309b4db0d92de0d31.tar.zst
cuberite-17a94b16ea6207fd5f38fbd309b4db0d92de0d31.zip
Diffstat (limited to 'src/Protocol/Authenticator.cpp')
-rw-r--r--src/Protocol/Authenticator.cpp11
1 files changed, 1 insertions, 10 deletions
diff --git a/src/Protocol/Authenticator.cpp b/src/Protocol/Authenticator.cpp
index e5d16cf10..160564d51 100644
--- a/src/Protocol/Authenticator.cpp
+++ b/src/Protocol/Authenticator.cpp
@@ -188,21 +188,12 @@ bool cAuthenticator::AuthWithYggdrasil(AString & a_UserName, const AString & a_S
return false;
}
a_UserName = root.get("name", "Unknown").asString();
- a_UUID = root.get("id", "").asString();
+ a_UUID = cMojangAPI::MakeUUIDShort(root.get("id", "").asString());
a_Properties = root["properties"];
// Store the player's UUID in the NameToUUID map in MojangAPI:
cRoot::Get()->GetMojangAPI().AddPlayerNameToUUIDMapping(a_UserName, a_UUID);
- // If the UUID doesn't contain the dashes, insert them at the proper places:
- if (a_UUID.size() == 32)
- {
- a_UUID.insert(8, "-");
- a_UUID.insert(13, "-");
- a_UUID.insert(18, "-");
- a_UUID.insert(23, "-");
- }
-
return true;
}