diff options
Diffstat (limited to 'protocols/Steam/src/steam_polling.cpp')
-rw-r--r-- | protocols/Steam/src/steam_polling.cpp | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/protocols/Steam/src/steam_polling.cpp b/protocols/Steam/src/steam_polling.cpp index a008c359cb..6b53d31763 100644 --- a/protocols/Steam/src/steam_polling.cpp +++ b/protocols/Steam/src/steam_polling.cpp @@ -119,19 +119,22 @@ void CSteamProto::ParsePollData(JSONNode *data) case 2: {// auth request - /*MCONTACT hContact = FindContact(steamId); - if (!hContact) - hContact = AddContact(steamId, true);*/ - - //RaiseAuthRequestThread((void*)hContact); - - ptrA token(getStringA("TokenSecret")); - - PushRequest( - new GetUserSummariesRequest(token, steamId), - &CSteamProto::OnAuthRequested, - mir_strdup(steamId), - MirFreeArg); + MCONTACT hContact = FindContact(steamId); + if (hContact) + { + ContactIsAskingAuth(hContact); + } + else + { + // load info about this user from server + ptrA token(getStringA("TokenSecret")); + + PushRequest( + new GetUserSummariesRequest(token, steamId), + &CSteamProto::OnAuthRequested, + mir_strdup(steamId), + MirFreeArg); + } } break; |