diff options
author | George Hazan <ghazan@miranda.im> | 2017-12-29 17:27:00 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2017-12-29 17:27:08 +0300 |
commit | f16cf071e51f4768f20692c99414cb39521fa413 (patch) | |
tree | 7dd3cc512fe65fdd546f7753937261c518e5008c /protocols/MSN | |
parent | 939048b7ebce6a70c8e243fec36983de7d931e8b (diff) |
PROTO_INTERFACE::setAllContactStatuses - common code moved to the core
Diffstat (limited to 'protocols/MSN')
-rw-r--r-- | protocols/MSN/src/msn_auth.cpp | 3 | ||||
-rw-r--r-- | protocols/MSN/src/msn_misc.cpp | 19 |
2 files changed, 3 insertions, 19 deletions
diff --git a/protocols/MSN/src/msn_auth.cpp b/protocols/MSN/src/msn_auth.cpp index 228792b274..c9a2715370 100644 --- a/protocols/MSN/src/msn_auth.cpp +++ b/protocols/MSN/src/msn_auth.cpp @@ -330,8 +330,9 @@ int debugLogSkyLoginA(void *Pproto, LPCSTR szFormat, ...) va_list args;
va_start(args, szFormat);
- ProtoLogA(pProto, szFormat, args);
+ CMStringA body; body.FormatV(szFormat, args);
va_end(args);
+ pProto->debugLogA("%s", body.c_str());
return 1;
}
diff --git a/protocols/MSN/src/msn_misc.cpp b/protocols/MSN/src/msn_misc.cpp index 9a7f7157bf..8376d8b8f4 100644 --- a/protocols/MSN/src/msn_misc.cpp +++ b/protocols/MSN/src/msn_misc.cpp @@ -368,24 +368,7 @@ void CMsnProto::MSN_GoOffline(void) int msnOldStatus = m_iStatus; m_iStatus = m_iDesiredStatus = ID_STATUS_OFFLINE;
ProtoBroadcastAck(NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)msnOldStatus, ID_STATUS_OFFLINE);
isIdle = false;
-
- MCONTACT hContact = NULL;
-
- for (hContact = db_find_first(m_szModuleName); hContact;
- hContact = db_find_next(hContact, m_szModuleName))
- {
- if (isChatRoom(hContact) != 0) {
- ptrW wszRoom(getWStringA(hContact, "ChatRoomID"));
- if (wszRoom != NULL)
- Chat_Control(m_szModuleName, wszRoom, SESSION_OFFLINE);
- }
- else {
- if (ID_STATUS_OFFLINE != getWord(hContact, "Status", ID_STATUS_OFFLINE)) {
- setWord(hContact, "Status", ID_STATUS_OFFLINE);
- setDword(hContact, "IdleTS", 0);
- }
- }
- }
+ setAllContactStatuses(ID_STATUS_OFFLINE, true);
}
}
|