summaryrefslogtreecommitdiff
path: root/protocols/EmLanProto
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/EmLanProto
parentd095047014348c9e8dd72a72dc59b2abd22bbf9c (diff)
Clist_IsHidden / Clist_HideContact - two helpers to hide CList/Hidden variable and unify access to it
Diffstat (limited to 'protocols/EmLanProto')
-rw-r--r--protocols/EmLanProto/src/mlan.cpp8
-rw-r--r--protocols/EmLanProto/src/stdafx.h1
2 files changed, 5 insertions, 4 deletions
diff --git a/protocols/EmLanProto/src/mlan.cpp b/protocols/EmLanProto/src/mlan.cpp
index 6ad76e2f95..27a3d9508e 100644
--- a/protocols/EmLanProto/src/mlan.cpp
+++ b/protocols/EmLanProto/src/mlan.cpp
@@ -207,7 +207,7 @@ MCONTACT CMLan::FindContact(in_addr addr, const char *nick, bool add_to_list, bo
if (make_permanent)
db_unset(res, "CList", "NotOnList");
if (make_visible)
- db_unset(res, "CList", "Hidden");
+ Clist_HideContact(res, false);
return res;
}
}
@@ -221,7 +221,7 @@ MCONTACT CMLan::FindContact(in_addr addr, const char *nick, bool add_to_list, bo
if (!make_permanent)
db_set_b(res, "CList", "NotOnList", 1);
if (!make_visible)
- db_set_b(res, "CList", "Hidden", 1);
+ Clist_HideContact(res);
g_plugin.setWord(res, "Status", status);
return res;
@@ -340,7 +340,7 @@ void CMLan::OnRecvPacket(u_char *mes, int len, in_addr from)
void CMLan::RecvMessageUrl(CCSDATA *ccs)
{
- db_unset(ccs->hContact, "CList", "Hidden");
+ Clist_HideContact(ccs->hContact, false);
PROTORECVEVENT *pre = (PROTORECVEVENT*)ccs->lParam;
ptrA szMessage(mir_utf8encode(pre->szMessage));
@@ -924,7 +924,7 @@ void CMLan::RecvFile(CCSDATA *ccs)
{
PROTORECVEVENT *pre = (PROTORECVEVENT *)ccs->lParam;
- db_unset(ccs->hContact, "CList", "Hidden");
+ Clist_HideContact(ccs->hContact, false);
char *szFile = pre->szMessage + sizeof(DWORD);
char *szDesc = szFile + mir_strlen(szFile) + 1;
diff --git a/protocols/EmLanProto/src/stdafx.h b/protocols/EmLanProto/src/stdafx.h
index 5da73a09ee..550e2dfaf3 100644
--- a/protocols/EmLanProto/src/stdafx.h
+++ b/protocols/EmLanProto/src/stdafx.h
@@ -16,6 +16,7 @@
#include <m_protosvc.h>
#include <m_database.h>
#include <m_langpack.h>
+#include <m_clist.h>
#include "resource.h"
#include "version.h"