From 79b9cfd9d1016335c2004d3cb188d8780ee7fcb9 Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Tue, 8 Apr 2014 20:10:21 +0000 Subject: Steam: - fixed small issues - added initial api description git-svn-id: http://svn.miranda-ng.org/main/trunk@8895 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Steam/src/steam_account.cpp | 6 ++++++ protocols/Steam/src/steam_messages.cpp | 15 +-------------- 2 files changed, 7 insertions(+), 14 deletions(-) (limited to 'protocols/Steam/src') diff --git a/protocols/Steam/src/steam_account.cpp b/protocols/Steam/src/steam_account.cpp index 133ddd068c..c0686cf7bd 100644 --- a/protocols/Steam/src/steam_account.cpp +++ b/protocols/Steam/src/steam_account.cpp @@ -90,6 +90,12 @@ void CSteamProto::Authorize(SteamWebApi::AuthorizationApi::AuthResult *authResul ptrW username(getWStringA("Username")); ptrA base64RsaEncryptedPassword; + const wchar_t *nickname = getWStringA("Nick"); + if (lstrlen(nickname) == 0 && username) + setWString("Nick", username); + + return; + // get rsa public key SteamWebApi::RsaKeyApi::RsaKey rsaKey; SteamWebApi::RsaKeyApi::GetRsaKey(m_hNetlibUser, username, &rsaKey); diff --git a/protocols/Steam/src/steam_messages.cpp b/protocols/Steam/src/steam_messages.cpp index 20496bc039..144d3d28a2 100644 --- a/protocols/Steam/src/steam_messages.cpp +++ b/protocols/Steam/src/steam_messages.cpp @@ -17,20 +17,7 @@ void CSteamProto::SendMessageThread(void *arg) sendResult.IsSuccess() ? ACKRESULT_SUCCESS : ACKRESULT_FAILED, param->hMessage, 0); - if (sendResult.IsSuccess()) - { - DBEVENTINFO dbei = { sizeof(dbei) }; - dbei.szModule = this->m_szModuleName; - dbei.timestamp = sendResult.GetTimestamp(); - dbei.eventType = EVENTTYPE_MESSAGE; - dbei.cbBlob = strlen(param->text); - dbei.pBlob = (BYTE*)param->text; - dbei.flags = DBEF_UTF | DBEF_SENT; - - db_event_add(param->hContact, &dbei); - } - - //mir_free((void*)param->text); + mir_free((void*)param->text); mir_free(param); } -- cgit v1.2.3