diff options
Diffstat (limited to 'protocols/ICQ-WIM/src/server.cpp')
-rw-r--r-- | protocols/ICQ-WIM/src/server.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/protocols/ICQ-WIM/src/server.cpp b/protocols/ICQ-WIM/src/server.cpp index 2525482ec7..c650fc2224 100644 --- a/protocols/ICQ-WIM/src/server.cpp +++ b/protocols/ICQ-WIM/src/server.cpp @@ -89,7 +89,16 @@ void CIcqProto::CheckPassword() m_szAToken = getMStringA(DB_KEY_ATOKEN); m_iRClientId = getDword(DB_KEY_RCLIENTID); m_szSessionKey = getMStringA(DB_KEY_SESSIONKEY); - if (m_szAToken.IsEmpty() || m_szSessionKey.IsEmpty()) { + if (!m_szAToken.IsEmpty() && !m_szSessionKey.IsEmpty()) { + StartSession(); + return; + } + + if (m_isMra) { + m_bError462 = false; + SendMrimLogin(nullptr); + } + else { auto *pReq = new AsyncHttpRequest(CONN_MAIN, REQUEST_POST, "https://api.login.icq.net/auth/clientLogin", &CIcqProto::OnCheckPassword); pReq << CHAR_PARAM("clientName", "Miranda NG") << CHAR_PARAM("clientVersion", mirVer) << CHAR_PARAM("devId", ICQ_APP_ID) << CHAR_PARAM("f", "json") << CHAR_PARAM("tokenType", "longTerm") << WCHAR_PARAM("s", m_szOwnId) << CHAR_PARAM("pwd", m_szPassword); @@ -98,7 +107,6 @@ void CIcqProto::CheckPassword() #endif Push(pReq); } - else StartSession(); } IcqFileInfo* CIcqProto::CheckFile(MCONTACT hContact, CMStringW &wszText, bool &bIsFile) |