diff options
author | George Hazan <george.hazan@gmail.com> | 2024-10-30 20:26:17 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2024-10-30 20:26:17 +0300 |
commit | faaa001c53bb246f65583f1a526be9cbfa0fcaed (patch) | |
tree | f19b17ba6c4dde80222461683bf99e79d0c707a9 /plugins | |
parent | 851cf91ef94adc40d49f4d60e6f0f32694fba96b (diff) |
fixes #4600 (tabSRMM: muted chats shall not create windows automatically)
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/TabSRMM/src/container.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/TabSRMM/src/container.cpp b/plugins/TabSRMM/src/container.cpp index 0eafde8a99..d00b71e89f 100644 --- a/plugins/TabSRMM/src/container.cpp +++ b/plugins/TabSRMM/src/container.cpp @@ -2294,6 +2294,9 @@ int TSAPI ActivateTabFromHWND(HWND hwndTab, HWND hwnd) CMsgDialog* TSAPI AutoCreateWindow(TContainerData *pContainer, MCONTACT hContact, bool bActivate)
{
+ if (Chat_IsMuted(hContact) == CHATMODE_MUTE)
+ return nullptr;
+
bool bAllowAutoCreate = false, bForceCreate = g_plugin.bAutoPopup || bActivate;
uint32_t dwStatusMask = M.GetDword("autopopupmask", -1);
@@ -2306,7 +2309,7 @@ CMsgDialog* TSAPI AutoCreateWindow(TContainerData *pContainer, MCONTACT hContact if (szProto) {
int dwStatus = Proto_GetStatus(szProto);
- if (dwStatus == 0 || dwStatus <= ID_STATUS_OFFLINE)
+ if (dwStatus == 0 || dwStatus <= ID_STATUS_OFFLINE || ((1 << (dwStatus - ID_STATUS_ONLINE)) & dwStatusMask))
bAllowAutoCreate = true;
}
}
|