From f16cf071e51f4768f20692c99414cb39521fa413 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 29 Dec 2017 17:27:00 +0300 Subject: PROTO_INTERFACE::setAllContactStatuses - common code moved to the core --- protocols/MSN/src/msn_auth.cpp | 3 ++- protocols/MSN/src/msn_misc.cpp | 19 +------------------ 2 files changed, 3 insertions(+), 19 deletions(-) (limited to 'protocols/MSN') 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); } } -- cgit v1.2.3