From a80bdd6af923f74516a4ccdb0fb2c72f82c48df4 Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Wed, 18 Jun 2014 16:06:53 +0000 Subject: Steam: fixed connection git-svn-id: http://svn.miranda-ng.org/main/trunk@9538 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Steam/src/Steam/authorization.h | 2 +- protocols/Steam/src/steam_account.cpp | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) (limited to 'protocols') diff --git a/protocols/Steam/src/Steam/authorization.h b/protocols/Steam/src/Steam/authorization.h index 74a2188aca..194a5dee36 100644 --- a/protocols/Steam/src/Steam/authorization.h +++ b/protocols/Steam/src/Steam/authorization.h @@ -15,7 +15,7 @@ namespace SteamWebApi guardId, guardCode, captchaId, - captchaText, + ptrA(mir_urlEncode(captchaText)), timestamp, time(NULL)); diff --git a/protocols/Steam/src/steam_account.cpp b/protocols/Steam/src/steam_account.cpp index 70f1c561d4..274ae4699f 100644 --- a/protocols/Steam/src/steam_account.cpp +++ b/protocols/Steam/src/steam_account.cpp @@ -74,6 +74,15 @@ void CSteamProto::OnAuthorization(const NETLIBHTTPREQUEST *response, void *arg) node = json_get(root, "success"); if (json_as_bool(node) == 0) { + node = json_get(root, "message"); + const wchar_t *message = json_as_string(node); + if (!lstrcmpi(json_as_string(node), L"Incorrect login")) + { + ShowNotification(TranslateTS(message)); + SetStatus(ID_STATUS_OFFLINE); + return; + } + node = json_get(root, "emailauth_needed"); if (json_as_bool(node) > 0) { @@ -148,7 +157,6 @@ void CSteamProto::OnAuthorization(const NETLIBHTTPREQUEST *response, void *arg) &CSteamProto::OnAuthorization); } - SetStatus(ID_STATUS_OFFLINE); return; } -- cgit v1.2.3