diff options
author | George Hazan <ghazan@miranda.im> | 2019-09-26 22:15:57 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-09-26 22:15:57 +0300 |
commit | 15c49e3fc4cf033fffbf79e9f68a0405d5a95d14 (patch) | |
tree | 3ba342e3e8645156102d3c5f3f9a1b5dafe4c22c /protocols/MSN | |
parent | d095047014348c9e8dd72a72dc59b2abd22bbf9c (diff) |
Clist_IsHidden / Clist_HideContact - two helpers to hide CList/Hidden variable and unify access to it
Diffstat (limited to 'protocols/MSN')
-rw-r--r-- | protocols/MSN/src/msn_commands.cpp | 2 | ||||
-rw-r--r-- | protocols/MSN/src/msn_contact.cpp | 2 | ||||
-rw-r--r-- | protocols/MSN/src/msn_proto.cpp | 8 | ||||
-rw-r--r-- | protocols/MSN/src/msn_soapab.cpp | 2 |
4 files changed, 7 insertions, 7 deletions
diff --git a/protocols/MSN/src/msn_commands.cpp b/protocols/MSN/src/msn_commands.cpp index e4e3beca97..54a751bc27 100644 --- a/protocols/MSN/src/msn_commands.cpp +++ b/protocols/MSN/src/msn_commands.cpp @@ -524,7 +524,7 @@ void CMsnProto::MSN_ProcessYFind(char* buf, size_t len) MSN_AddUser(hContact, szEmail, netId, LIST_PL + LIST_REMOVE);
MSN_AddUser(hContact, szEmail, netId, LIST_BL + LIST_REMOVE);
MSN_AddUser(hContact, szEmail, netId, LIST_AL);
- db_unset(hContact, "CList", "Hidden");
+ Clist_HideContact(hContact, false);
}
MSN_SetContactDb(hContact, szEmail);
}
diff --git a/protocols/MSN/src/msn_contact.cpp b/protocols/MSN/src/msn_contact.cpp index 61e1cbb5fb..46e96c72c3 100644 --- a/protocols/MSN/src/msn_contact.cpp +++ b/protocols/MSN/src/msn_contact.cpp @@ -80,7 +80,7 @@ void CMsnProto::MSN_SetContactDb(MCONTACT hContact, const char *szEmail) if (listId & LIST_FL) {
if (db_get_b(hContact, "CList", "NotOnList", 0) == 1) {
db_unset(hContact, "CList", "NotOnList");
- db_unset(hContact, "CList", "Hidden");
+ Clist_HideContact(hContact, false);
}
if (listId & (LIST_BL | LIST_AL)) {
diff --git a/protocols/MSN/src/msn_proto.cpp b/protocols/MSN/src/msn_proto.cpp index 1ab70262a8..56fa7c818b 100644 --- a/protocols/MSN/src/msn_proto.cpp +++ b/protocols/MSN/src/msn_proto.cpp @@ -195,17 +195,17 @@ MCONTACT CMsnProto::AddToListByEmail(const char *email, const char *nick, DWORD if (flags & PALF_TEMPORARY) {
if (db_get_b(hContact, "CList", "NotOnList", 0) == 1)
- db_set_b(hContact, "CList", "Hidden", 1);
+ Clist_HideContact(hContact);
}
else {
- db_unset(hContact, "CList", "Hidden");
+ Clist_HideContact(hContact, false);
if (msnLoggedIn) {
int netId = strncmp(email, "tel:", 4) ? NETID_MSN : NETID_MOB;
if (MSN_AddUser(hContact, email, netId, LIST_FL)) {
MSN_AddUser(hContact, email, netId, LIST_PL + LIST_REMOVE);
MSN_AddUser(hContact, email, netId, LIST_BL + LIST_REMOVE);
MSN_AddUser(hContact, email, netId, LIST_AL);
- db_unset(hContact, "CList", "Hidden");
+ Clist_HideContact(hContact, false);
}
MSN_SetContactDb(hContact, email);
@@ -660,7 +660,7 @@ MEVENT CMsnProto::RecvMsg(MCONTACT hContact, PROTORECVEVENT* pre) char tEmail[MSN_MAX_EMAIL_LEN];
if (!db_get_static(hContact, m_szModuleName, "wlid", tEmail, sizeof(tEmail)) || !db_get_static(hContact, m_szModuleName, "e-mail", tEmail, sizeof(tEmail)))
if (Lists_IsInList(LIST_FL, tEmail) && db_get_b(hContact, "MetaContacts", "IsSubcontact", 0) == 0)
- db_unset(hContact, "CList", "Hidden");
+ Clist_HideContact(hContact, false);
return CSuper::RecvMsg(hContact, pre);
}
diff --git a/protocols/MSN/src/msn_soapab.cpp b/protocols/MSN/src/msn_soapab.cpp index 3b73664455..6e84d40ea2 100644 --- a/protocols/MSN/src/msn_soapab.cpp +++ b/protocols/MSN/src/msn_soapab.cpp @@ -917,7 +917,7 @@ bool CMsnProto::MSN_ABRefreshClist(unsigned int nTry) else
delSetting(hContact, "Nick");
if (mir_strcmpi(ezxml_txt(ezxml_child(pers, "onHideList")), "true") == 0)
- db_set_b(hContact, "CList", "Hidden", 1);
+ Clist_HideContact(hContact);
setString(hContact, "ID", ezxml_txt(ezxml_child(pers, "id")));
SetAbParam(hContact, "CID", cid);
|