summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2014-06-18 16:06:53 +0000
committerAlexander Lantsev <aunsane@gmail.com>2014-06-18 16:06:53 +0000
commita80bdd6af923f74516a4ccdb0fb2c72f82c48df4 (patch)
tree06b18e1e6d11adf5662594c64526734262f122da /protocols
parent712eac88f619b057d335bbe11426292f033a6f49 (diff)
Steam: fixed connection
git-svn-id: http://svn.miranda-ng.org/main/trunk@9538 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols')
-rw-r--r--protocols/Steam/src/Steam/authorization.h2
-rw-r--r--protocols/Steam/src/steam_account.cpp10
2 files changed, 10 insertions, 2 deletions
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;
}