summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM/src
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/TabSRMM/src')
-rw-r--r--plugins/TabSRMM/src/msgs.cpp3
-rw-r--r--plugins/TabSRMM/src/utils.cpp11
2 files changed, 9 insertions, 5 deletions
diff --git a/plugins/TabSRMM/src/msgs.cpp b/plugins/TabSRMM/src/msgs.cpp
index c720434072..2d54f9a3d6 100644
--- a/plugins/TabSRMM/src/msgs.cpp
+++ b/plugins/TabSRMM/src/msgs.cpp
@@ -695,6 +695,9 @@ int LoadSendRecvMessageModule(void)
db_delete_module(0, NEN_OLD_MODULE);
}
+ if (M.GetDword("cWarningsV", 0) == 0)
+ db_set_dw(0, SRMSGMOD_T, "cWarningsV", M.GetDword("cWarningsL", 0));
+
HookEvent(ME_OPT_INITIALISE, OptInitialise);
InitAPI();
diff --git a/plugins/TabSRMM/src/utils.cpp b/plugins/TabSRMM/src/utils.cpp
index be370dfaf8..db0f20b3a6 100644
--- a/plugins/TabSRMM/src/utils.cpp
+++ b/plugins/TabSRMM/src/utils.cpp
@@ -680,7 +680,7 @@ LRESULT CWarning::show(const int uId, uint32_t dwFlags, const wchar_t* tszTxt)
uint32_t val = M.GetDword("cWarningsL", 0);
uint32_t mask = ((__int64)1L) << uId;
if (mask & val) {
- bool bResult = (M.GetDword("cWarningsV", 0xFFFFFFFF) & mask) != 0;
+ bool bResult = (M.GetDword("cWarningsV", 0) & mask) != 0;
if (dwFlags & MB_YESNO || dwFlags & MB_YESNOCANCEL)
return (bResult) ? IDYES : IDNO;
return IDOK;
@@ -820,10 +820,11 @@ INT_PTR CALLBACK CWarning::dlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP
if (::IsDlgButtonChecked(hwnd, IDC_DONTSHOWAGAIN)) {
uint32_t newVal = M.GetDword("cWarningsL", 0) | ((uint32_t)1L << m_uId);
db_set_dw(0, SRMSGMOD_T, "cWarningsL", newVal);
- }
- if (LOWORD(wParam) != IDNO) {
- uint32_t newVal = M.GetDword("cWarningsV", 0) | ((uint32_t)1L << m_uId);
- db_set_dw(0, SRMSGMOD_T, "cWarningsV", newVal);
+
+ if (LOWORD(wParam) != IDNO) {
+ newVal = M.GetDword("cWarningsV", 0) | ((uint32_t)1L << m_uId);
+ db_set_dw(0, SRMSGMOD_T, "cWarningsV", newVal);
+ }
}
__fallthrough;