diff options
author | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2014-07-16 01:03:47 +0200 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2014-07-16 01:03:47 +0200 |
commit | 1f6854792cdd6792b27c4f9f3d7d857df9dd64bf (patch) | |
tree | 4a45fccb4c6dbf7794d8f5e9d4b0bd5c68a0ec0a /src/Protocol/Authenticator.cpp | |
parent | Player properties are now retrieved (diff) | |
download | cuberite-1f6854792cdd6792b27c4f9f3d7d857df9dd64bf.tar cuberite-1f6854792cdd6792b27c4f9f3d7d857df9dd64bf.tar.gz cuberite-1f6854792cdd6792b27c4f9f3d7d857df9dd64bf.tar.bz2 cuberite-1f6854792cdd6792b27c4f9f3d7d857df9dd64bf.tar.lz cuberite-1f6854792cdd6792b27c4f9f3d7d857df9dd64bf.tar.xz cuberite-1f6854792cdd6792b27c4f9f3d7d857df9dd64bf.tar.zst cuberite-1f6854792cdd6792b27c4f9f3d7d857df9dd64bf.zip |
Diffstat (limited to 'src/Protocol/Authenticator.cpp')
-rw-r--r-- | src/Protocol/Authenticator.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/Protocol/Authenticator.cpp b/src/Protocol/Authenticator.cpp index 8fd8952e8..c01d748c6 100644 --- a/src/Protocol/Authenticator.cpp +++ b/src/Protocol/Authenticator.cpp @@ -115,7 +115,8 @@ void cAuthenticator::Authenticate(int a_ClientID, const AString & a_UserName, co { if (!m_ShouldAuthenticate) { - cRoot::Get()->AuthenticateUser(a_ClientID, a_UserName, cClientHandle::GenerateOfflineUUID(a_UserName)); + Json::Value Value; + cRoot::Get()->AuthenticateUser(a_ClientID, a_UserName, cClientHandle::GenerateOfflineUUID(a_UserName), Value); return; } @@ -177,7 +178,7 @@ void cAuthenticator::Execute(void) AString UUID; if (AuthWithYggdrasil(NewUserName, ServerID, UUID)) { - AString Properties; + Json::Value Properties; if (!GetPlayerProperties(UUID, Properties)) { LOGINFO("User %s authenticated with UUID %s but property getting failed", NewUserName.c_str(), UUID.c_str()); @@ -329,7 +330,7 @@ bool cAuthenticator::AuthWithYggdrasil(AString & a_UserName, const AString & a_S -bool cAuthenticator::GetPlayerProperties(const AString & a_UUID, AString & a_Properties) +bool cAuthenticator::GetPlayerProperties(const AString & a_UUID, Json::Value & a_Properties) { LOGD("Trying to get properties for user %s", a_UUID.c_str()); @@ -383,6 +384,10 @@ bool cAuthenticator::GetPlayerProperties(const AString & a_UUID, AString & a_Pro return false; } - a_Properties = root["properties"].toStyledString(); + a_Properties = root["properties"]; return true; -}
\ No newline at end of file +} + + + + |