From a885b9b55720f386c173262921a22d79c9fc7e5e Mon Sep 17 00:00:00 2001 From: kervala Date: Thu, 12 May 2016 19:51:52 +0200 Subject: [PATCH 1/3] Changed: Added new command /playedTime that displays time played with this character --HG-- branch : develop --- code/ryzom/client/src/commands.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/code/ryzom/client/src/commands.cpp b/code/ryzom/client/src/commands.cpp index 3308ee7ad..cb8c5d9df 100644 --- a/code/ryzom/client/src/commands.cpp +++ b/code/ryzom/client/src/commands.cpp @@ -5798,3 +5798,11 @@ NLMISC_COMMAND(time, "Shows information about the current time", "") CInterfaceManager::getInstance()->displaySystemInfo(msg, "AROUND"); return true; } + +NLMISC_COMMAND(playedTime, "Display character played time", "") +{ + ucstring msg = CI18N::get("uiPlayedTime"); + strFindReplace(msg, "%time", NLMISC::secondsToHumanReadable(CharPlayedTime)); + CInterfaceManager::getInstance()->displaySystemInfo(msg, "AROUND"); + return true; +} From 011b545ac812ffc381283052d01b0b7ace28a613 Mon Sep 17 00:00:00 2001 From: kervala Date: Thu, 12 May 2016 19:52:20 +0200 Subject: [PATCH 2/3] Changed: Minor changes --HG-- branch : develop --- code/ryzom/client/src/http_client_curl.cpp | 4 ++-- code/ryzom/common/src/game_share/http_client.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/code/ryzom/client/src/http_client_curl.cpp b/code/ryzom/client/src/http_client_curl.cpp index 322223f94..e19a435c9 100644 --- a/code/ryzom/client/src/http_client_curl.cpp +++ b/code/ryzom/client/src/http_client_curl.cpp @@ -261,11 +261,11 @@ bool CCurlHttpClient::receive(string &res, bool verbose) { if (verbose) { - nldebug("Receiving %u bytes", _ReceiveBuffer.size()); + nldebug("Receiving %u bytes", (uint)_ReceiveBuffer.size()); } res.clear(); - if (_ReceiveBuffer.size()) + if (!_ReceiveBuffer.empty()) res.assign((const char*)&(*(_ReceiveBuffer.begin())), _ReceiveBuffer.size()); _ReceiveBuffer.clear(); return true; diff --git a/code/ryzom/common/src/game_share/http_client.cpp b/code/ryzom/common/src/game_share/http_client.cpp index d6a5fe360..3e100c762 100644 --- a/code/ryzom/common/src/game_share/http_client.cpp +++ b/code/ryzom/common/src/game_share/http_client.cpp @@ -193,14 +193,14 @@ bool CHttpClient::receive(string &res, bool verbose) if (_Sock.receive((uint8*)buf, size, false) == CSock::Ok) { - if (verbose) nlinfo("Received OK %d bytes", size); + if (verbose) nlinfo("Received OK %u bytes", size); buf[1023] = '\0'; res += (char*)buf; //nlinfo("block received '%s'", buf); } else { - if (verbose) nlinfo("Received CLOSE %d bytes", size); + if (verbose) nlinfo("Received CLOSE %u bytes", size); buf[size] = '\0'; res += (char*)buf; //nlwarning ("server connection closed"); From c1d142b9eead4d8e3715a57d2326f189069ddfa3 Mon Sep 17 00:00:00 2001 From: kervala Date: Thu, 12 May 2016 19:53:16 +0200 Subject: [PATCH 3/3] Changed: Append cp=2 parameter to query when requesting salt to know that we support SHA512 crypt --HG-- branch : develop --- code/ryzom/client/src/login.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/ryzom/client/src/login.cpp b/code/ryzom/client/src/login.cpp index b8ac576d0..f11f7c363 100644 --- a/code/ryzom/client/src/login.cpp +++ b/code/ryzom/client/src/login.cpp @@ -2722,7 +2722,7 @@ string checkLogin(const string &login, const string &password, const string &cli std::string url = ClientCfg.ConfigFile.getVar("StartupHost").asString() + ClientCfg.ConfigFile.getVar("StartupPage").asString(); // ask server for salt - if(!HttpClient.sendGet(url + "?cmd=ask&login=" + login + "&lg=" + ClientCfg.LanguageCode, "", pPM->isVerboseLog())) + if(!HttpClient.sendGet(url + "?cmd=ask&cp=2&login=" + login + "&lg=" + ClientCfg.LanguageCode, "", pPM->isVerboseLog())) return "Can't send (error code 60)"; if(pPM->isVerboseLog()) nlinfo("Sent request for password salt");