summaryrefslogtreecommitdiff
path: root/protocols/JabberG/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2019-09-26 22:15:57 +0300
committerGeorge Hazan <ghazan@miranda.im>2019-09-26 22:15:57 +0300
commit15c49e3fc4cf033fffbf79e9f68a0405d5a95d14 (patch)
tree3ba342e3e8645156102d3c5f3f9a1b5dafe4c22c /protocols/JabberG/src
parentd095047014348c9e8dd72a72dc59b2abd22bbf9c (diff)
Clist_IsHidden / Clist_HideContact - two helpers to hide CList/Hidden variable and unify access to it
Diffstat (limited to 'protocols/JabberG/src')
-rw-r--r--protocols/JabberG/src/jabber_chat.cpp4
-rw-r--r--protocols/JabberG/src/jabber_events.cpp2
-rw-r--r--protocols/JabberG/src/jabber_iq_handlers.cpp2
-rwxr-xr-xprotocols/JabberG/src/jabber_iqid.cpp2
-rwxr-xr-xprotocols/JabberG/src/jabber_misc.cpp2
-rwxr-xr-xprotocols/JabberG/src/jabber_proto.cpp2
6 files changed, 7 insertions, 7 deletions
diff --git a/protocols/JabberG/src/jabber_chat.cpp b/protocols/JabberG/src/jabber_chat.cpp
index 8feab67e1b..402d007463 100644
--- a/protocols/JabberG/src/jabber_chat.cpp
+++ b/protocols/JabberG/src/jabber_chat.cpp
@@ -330,7 +330,7 @@ void CJabberProto::GcQuit(JABBER_LIST_ITEM *item, int code, const TiXmlElement *
else
Chat_Control(m_szModuleName, wszRoomJid, SESSION_OFFLINE);
- db_unset(item->hContact, "CList", "Hidden");
+ Clist_HideContact(item->hContact, false);
item->bChatActive = false;
if (m_bJabberOnline) {
@@ -1346,7 +1346,7 @@ static void sttSendPrivateMessage(CJabberProto *ppro, JABBER_LIST_ITEM *item, co
if (r)
ppro->setWord(hContact, "Status", r->m_iStatus);
- db_set_b(hContact, "CList", "Hidden", 1);
+ Clist_HideContact(hContact);
ppro->setUString(hContact, "Nick", nick);
db_set_dw(hContact, "Ignore", "Mask1", 0);
CallService(MS_MSG_SENDMESSAGE, hContact, 0);
diff --git a/protocols/JabberG/src/jabber_events.cpp b/protocols/JabberG/src/jabber_events.cpp
index 8bc1189fdf..8aac09a5cc 100644
--- a/protocols/JabberG/src/jabber_events.cpp
+++ b/protocols/JabberG/src/jabber_events.cpp
@@ -151,7 +151,7 @@ void __cdecl CJabberProto::OnAddContactForever(MCONTACT hContact)
SendGetVcard(hContact);
- db_unset(hContact, "CList", "Hidden");
+ Clist_HideContact(hContact, false);
}
int __cdecl CJabberProto::OnDbSettingChanged(WPARAM hContact, LPARAM lParam)
diff --git a/protocols/JabberG/src/jabber_iq_handlers.cpp b/protocols/JabberG/src/jabber_iq_handlers.cpp
index ed0ace2ff0..686e531a28 100644
--- a/protocols/JabberG/src/jabber_iq_handlers.cpp
+++ b/protocols/JabberG/src/jabber_iq_handlers.cpp
@@ -257,7 +257,7 @@ BOOL CJabberProto::OnRosterPushRequest(const TiXmlElement*, CJabberIqInfo *pInfo
UpdateSubscriptionInfo(item->hContact, item);
}
else if (isChatRoom(item->hContact))
- db_unset(item->hContact, "CList", "Hidden");
+ Clist_HideContact(item->hContact, false);
else
UpdateSubscriptionInfo(item->hContact, item);
}
diff --git a/protocols/JabberG/src/jabber_iqid.cpp b/protocols/JabberG/src/jabber_iqid.cpp
index eb528f544b..c15d6cc78b 100755
--- a/protocols/JabberG/src/jabber_iqid.cpp
+++ b/protocols/JabberG/src/jabber_iqid.cpp
@@ -431,7 +431,7 @@ void CJabberProto::OnIqResultGetRoster(const TiXmlElement *iqNode, CJabberIqInfo
if (char *p = strchr(wszTitle, '@')) *p = 0;
Chat_NewSession(GCW_CHATROOM, m_szModuleName, Utf2T(jid), Utf2T(wszTitle));
- db_unset(hContact, "CList", "Hidden");
+ Clist_HideContact(hContact, false);
chatRooms.insert((HANDLE)hContact);
}
else UpdateSubscriptionInfo(hContact, item);
diff --git a/protocols/JabberG/src/jabber_misc.cpp b/protocols/JabberG/src/jabber_misc.cpp
index f41edad6c6..736e60e854 100755
--- a/protocols/JabberG/src/jabber_misc.cpp
+++ b/protocols/JabberG/src/jabber_misc.cpp
@@ -46,7 +46,7 @@ void CJabberProto::AddContactToRoster(const char *jid, const char *nick, const c
void CJabberProto::DBAddAuthRequest(const char *jid, const char *nick)
{
MCONTACT hContact = DBCreateContact(jid, nick, true, true);
- delSetting(hContact, "Hidden");
+ Clist_HideContact(hContact, false);
DB_AUTH_BLOB blob(hContact, nick, nullptr, nullptr, jid, nullptr);
diff --git a/protocols/JabberG/src/jabber_proto.cpp b/protocols/JabberG/src/jabber_proto.cpp
index 3ac61aec58..bdca637d77 100755
--- a/protocols/JabberG/src/jabber_proto.cpp
+++ b/protocols/JabberG/src/jabber_proto.cpp
@@ -358,7 +358,7 @@ MCONTACT CJabberProto::AddToListByJID(const char *newJid, DWORD flags)
MCONTACT hContact = DBCreateContact(newJid, nullptr, true, false);
if (flags & PALF_TEMPORARY)
- db_set_b(hContact, "CList", "Hidden", 1);
+ Clist_HideContact(hContact);
return hContact;
}