summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2021-04-11 12:19:07 +0300
committerGeorge Hazan <ghazan@miranda.im>2021-04-11 12:19:07 +0300
commitdafd9a18a4b1573ff536e3db851e9e40a345c201 (patch)
tree7f6ead2892b30e109538eca380fde392240700ad /src
parenteb37be750853ee7e21406100e90b96469d501d36 (diff)
custom references to "PluginDisable" module removed
Diffstat (limited to 'src')
-rw-r--r--src/mir_app/src/newplugins.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/mir_app/src/newplugins.cpp b/src/mir_app/src/newplugins.cpp
index 12918f3426..9f91136a80 100644
--- a/src/mir_app/src/newplugins.cpp
+++ b/src/mir_app/src/newplugins.cpp
@@ -421,8 +421,14 @@ pluginEntry* OpenPlugin(wchar_t *tszFileName, wchar_t *dir, wchar_t *path)
MIR_APP_DLL(void) SetPluginOnWhiteList(const char* szPluginName, bool bAllow)
{
- if (szPluginName != nullptr)
- db_set_b(0, PLUGINDISABLELIST, CPluginName(szPluginName).c_str(), !bAllow);
+ if (szPluginName == nullptr)
+ return;
+
+ CPluginName tmp(szPluginName);
+ if (bAllow)
+ db_unset(0, PLUGINDISABLELIST, tmp);
+ else
+ db_set_b(0, PLUGINDISABLELIST, tmp, 1);
}
// returns 1 if the plugin should be enabled within this profile, filename is always lower case