From 85f8b97d732b1408ddce9d115a9b8796a6b9537c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20P=C3=B6sel?= Date: Thu, 7 Aug 2014 02:02:10 +0000 Subject: Facebook: Try to get some error message on unsucessful login git-svn-id: http://svn.miranda-ng.org/main/trunk@10106 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/FacebookRM/src/communication.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/protocols/FacebookRM/src/communication.cpp b/protocols/FacebookRM/src/communication.cpp index 6153fbc77b..89805f56b0 100644 --- a/protocols/FacebookRM/src/communication.cpp +++ b/protocols/FacebookRM/src/communication.cpp @@ -849,15 +849,18 @@ bool facebook_client::login(const char *username, const char *password) case HTTP_CODE_OK: // OK page returned, but that is regular login page we don't want in fact { // Check whether captcha code is required - if (resp.data.find("id=\"captcha\"") != std::string::npos) - { + if (resp.data.find("id=\"captcha\"") != std::string::npos) { client_notify(TranslateT("Login error: Captcha code is required. Bad login credentials?")); parent->debugLogA(" ! ! Login error: Captcha code is required."); return handle_error("login", FORCE_QUIT); } // Get and notify error message - loginError(parent, utils::text::source_get_value(&resp.data, 4, "login_error_box", "", "")); + std::string error = utils::text::source_get_value(&resp.data, 4, "login_error_box", "", ""); + if (error.empty()) + error = utils::text::source_get_value(&resp.data, 3, "