Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/EionRobb/pidgin-opensteamworks.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--steam-mobile/libsteam.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/steam-mobile/libsteam.c b/steam-mobile/libsteam.c
index b18b07d..6b2e243 100644
--- a/steam-mobile/libsteam.c
+++ b/steam-mobile/libsteam.c
@@ -959,7 +959,12 @@ steam_set_steam_guard_token_cb(gpointer data, const gchar *steam_guard_token)
PurpleAccount *account = data;
purple_account_set_string(account, "steam_guard_code", steam_guard_token);
- purple_account_connect(account);
+
+ if (!purple_account_get_enabled(account, purple_core_get_ui())) {
+ purple_account_set_enabled(account, purple_core_get_ui(), TRUE);
+ } else {
+ purple_account_connect(account);
+ }
}
static void
@@ -1005,7 +1010,12 @@ steam_login_cb(SteamAccount *sa, JsonObject *obj, gpointer user_data)
purple_connection_error(sa->pc, PURPLE_CONNECTION_ERROR_AUTHENTICATION_FAILED, error_description);
} else
{
- purple_connection_error(sa->pc, PURPLE_CONNECTION_ERROR_AUTHENTICATION_FAILED, error_description);
+ if (g_str_equal(error_description, "SteamGuard"))
+ {
+ steam_set_steam_guard_token_cb(sa->account, NULL);
+ } else {
+ purple_connection_error(sa->pc, PURPLE_CONNECTION_ERROR_AUTHENTICATION_FAILED, error_description);
+ }
}
}
}