From 1f6854792cdd6792b27c4f9f3d7d857df9dd64bf Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Wed, 16 Jul 2014 00:03:47 +0100 Subject: Store properties as Json::Value --- src/Protocol/Authenticator.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'src/Protocol/Authenticator.cpp') 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 +} + + + + -- cgit v1.2.3