From e441a31e9f912fc8e9244d16560565559b1924d2 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 27 Sep 2019 23:43:06 +0300 Subject: end of manual experiments with CList/NotOnList --- protocols/MSN/src/msn_contact.cpp | 6 +++--- protocols/MSN/src/msn_proto.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'protocols/MSN/src') diff --git a/protocols/MSN/src/msn_contact.cpp b/protocols/MSN/src/msn_contact.cpp index 863a8e99f3..0bc5838533 100644 --- a/protocols/MSN/src/msn_contact.cpp +++ b/protocols/MSN/src/msn_contact.cpp @@ -44,7 +44,7 @@ MCONTACT CMsnProto::MSN_HContactFromEmail(const char* wlid, const char* msnNick, setWord(hContact, "netId", netId); setString(hContact, "wlid", szEmail); if (temporary) - db_set_b(hContact, "CList", "NotOnList", 1); + Contact_RemoveFromList(hContact); Lists_Add(0, szNet?atoi(szNet):NETID_MSN, szEmail, hContact); } @@ -78,8 +78,8 @@ void CMsnProto::MSN_SetContactDb(MCONTACT hContact, const char *szEmail) const int listId = cont->list; if (listId & LIST_FL) { - if (db_get_b(hContact, "CList", "NotOnList", 0) == 1) { - db_unset(hContact, "CList", "NotOnList"); + if (!Contact_OnList(hContact)) { + Contact_PutOnList(hContact); Contact_Hide(hContact, false); } diff --git a/protocols/MSN/src/msn_proto.cpp b/protocols/MSN/src/msn_proto.cpp index fd78f32d77..b4eed8da74 100644 --- a/protocols/MSN/src/msn_proto.cpp +++ b/protocols/MSN/src/msn_proto.cpp @@ -194,7 +194,7 @@ MCONTACT CMsnProto::AddToListByEmail(const char *email, const char *nick, DWORD MCONTACT hContact = MSN_HContactFromEmail(email, nick, true, flags & PALF_TEMPORARY); if (flags & PALF_TEMPORARY) { - if (db_get_b(hContact, "CList", "NotOnList", 0) == 1) + if (!Contact_OnList(hContact)) Contact_Hide(hContact); } else { -- cgit v1.2.3