summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM/src/chat_tools.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2023-03-20 17:38:47 +0300
committerGeorge Hazan <ghazan@miranda.im>2023-03-20 17:38:47 +0300
commitf12de5d0954a0e24852a1a309dffee37b5536970 (patch)
treea37e69e3317e8e8733c9dfc948d12f57be207a50 /plugins/TabSRMM/src/chat_tools.cpp
parent54b2cd28874a94509275206e8869d0d26eabd451 (diff)
fixes #3441 completely
Diffstat (limited to 'plugins/TabSRMM/src/chat_tools.cpp')
-rw-r--r--plugins/TabSRMM/src/chat_tools.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/plugins/TabSRMM/src/chat_tools.cpp b/plugins/TabSRMM/src/chat_tools.cpp
index 754f19705b..107d55d855 100644
--- a/plugins/TabSRMM/src/chat_tools.cpp
+++ b/plugins/TabSRMM/src/chat_tools.cpp
@@ -357,12 +357,15 @@ BOOL DoSoundsFlashPopupTrayStuff(SESSION_INFO *si, GCEVENT *gce, BOOL bHighlight
void Chat_SetFilters(SESSION_INFO *si)
{
+ bool bEnabled = db_get_b(si->hContact, CHAT_MODULE, "FilterEnabled") != 0;
+
uint32_t dwFlags_local = db_get_dw(si->hContact, CHAT_MODULE, "FilterFlags", GC_EVENT_ALL);
- uint32_t dwMask = db_get_dw(si->hContact, CHAT_MODULE, "FilterMask", 0);
+ uint32_t dwMask = (bEnabled) ? db_get_dw(si->hContact, CHAT_MODULE, "FilterMask") : 0;
CMsgDialog *pDlg = si->pDlg;
if (pDlg) {
pDlg->m_iLogFilterFlags = Chat::iFilterFlags;
+
for (int i = 0; i < 32; i++) {
uint32_t dwBit = 1 << i;
if (dwMask & dwBit)
@@ -371,7 +374,7 @@ void Chat_SetFilters(SESSION_INFO *si)
}
dwFlags_local = db_get_dw(si->hContact, CHAT_MODULE, "PopupFlags", GC_EVENT_HIGHLIGHT);
- dwMask = db_get_dw(si->hContact, CHAT_MODULE, "PopupMask", 0);
+ dwMask = (bEnabled) ? db_get_dw(si->hContact, CHAT_MODULE, "PopupMask", 0) : 0;
si->iPopupFlags = Chat::iPopupFlags;
for (int i = 0; i < 32; i++) {
@@ -381,7 +384,7 @@ void Chat_SetFilters(SESSION_INFO *si)
}
dwFlags_local = db_get_dw(si->hContact, CHAT_MODULE, "TrayIconFlags", GC_EVENT_HIGHLIGHT);
- dwMask = db_get_dw(si->hContact, CHAT_MODULE, "TrayIconMask", 0);
+ dwMask = (bEnabled) ? db_get_dw(si->hContact, CHAT_MODULE, "TrayIconMask", 0) : 0;
si->iTrayFlags = Chat::iTrayIconFlags;
for (int i = 0; i < 32; i++) {