summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--protocols/ICQ-WIM/src/server.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/protocols/ICQ-WIM/src/server.cpp b/protocols/ICQ-WIM/src/server.cpp
index b160cea08a..16472244f3 100644
--- a/protocols/ICQ-WIM/src/server.cpp
+++ b/protocols/ICQ-WIM/src/server.cpp
@@ -320,7 +320,8 @@ void CIcqProto::OnLoggedIn()
for (auto &it : m_arCache)
it->m_timer1 = it->m_timer2 = 0;
- setWord(m_hFavContact, "Status", ID_STATUS_ONLINE);
+ if (m_hFavContact != INVALID_CONTACT_ID)
+ setWord(m_hFavContact, "Status", ID_STATUS_ONLINE);
SetServerStatus(m_iDesiredStatus);
RetrieveUserInfo(0);
@@ -1287,7 +1288,9 @@ void CIcqProto::OnStartSession(NETLIBHTTPREQUEST *pReply, AsyncHttpRequest *)
m_fetchBaseURL = data["fetchBaseURL"].as_mstring();
m_aimsid = data["aimsid"].as_mstring();
- ProcessMyInfo(data["myInfo"]);
+ auto &myInfo = data["myInfo"];
+ ProcessMyInfo(myInfo);
+ SetOwnId(myInfo["aimId"].as_mstring());
int srvTS = data["ts"].as_int();
m_iTimeShift = (srvTS) ? time(0) - srvTS : 0;