diff options
author | George Hazan <ghazan@miranda.im> | 2018-11-12 21:44:56 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-11-12 21:44:56 +0300 |
commit | 53fe3e46177d17b4941610de19f5cc6210700cb4 (patch) | |
tree | b67a6bc208dad141f9db14035cd7e42ff2a51872 /plugins/MirLua/src | |
parent | 488214ac8af0c4aeb1a5c1d8fd48368daaf4c4c7 (diff) |
db_* functions replaced with g_plugin calls
Diffstat (limited to 'plugins/MirLua/src')
-rw-r--r-- | plugins/MirLua/src/script.cpp | 6 | ||||
-rw-r--r-- | plugins/MirLua/src/utils.cpp | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/plugins/MirLua/src/script.cpp b/plugins/MirLua/src/script.cpp index 2337a6737d..79f30e5399 100644 --- a/plugins/MirLua/src/script.cpp +++ b/plugins/MirLua/src/script.cpp @@ -56,17 +56,17 @@ bool CMLuaScript::IsBinary() const bool CMLuaScript::IsEnabled() const
{
- return db_get_b(NULL, MODULENAME, _T2A(scriptName), 1);
+ return g_plugin.getByte(_T2A(scriptName), 1);
}
void CMLuaScript::Enable()
{
- db_unset(NULL, MODULENAME, _T2A(scriptName));
+ g_plugin.delSetting(_T2A(scriptName));
}
void CMLuaScript::Disable()
{
- db_set_b(NULL, MODULENAME, _T2A(scriptName), 0);
+ g_plugin.setByte(_T2A(scriptName), 0);
}
ScriptStatus CMLuaScript::GetStatus() const
diff --git a/plugins/MirLua/src/utils.cpp b/plugins/MirLua/src/utils.cpp index d4a4578cd9..1292a25f50 100644 --- a/plugins/MirLua/src/utils.cpp +++ b/plugins/MirLua/src/utils.cpp @@ -21,7 +21,7 @@ void ShowNotification(const char *caption, const char *message, int flags, MCONT if (Miranda_IsTerminated()) return; - if (ServiceExists(MS_POPUP_ADDPOPUPT) && db_get_b(NULL, "Popup", "ModuleIsEnabled", 1)) + if (ServiceExists(MS_POPUP_ADDPOPUPT) && db_get_b(0, "Popup", "ModuleIsEnabled", 1)) { POPUPDATA ppd = { 0 }; ppd.lchContact = hContact; @@ -44,7 +44,7 @@ void ObsoleteMethod(lua_State *L, const char *message) char text[512]; mir_snprintf(text, "%s is obsolete. %s", ar.name, message); Log(text); - if (db_get_b(NULL, MODULENAME, "PopupOnObsolete", 0)) + if (g_plugin.getByte("PopupOnObsolete", 0)) ShowNotification(MODULENAME, text, MB_OK | MB_ICONWARNING, NULL); } @@ -52,7 +52,7 @@ void ReportError(lua_State *L) { const char *message = lua_tostring(L, -1); Log(message); - if (db_get_b(NULL, MODULENAME, "PopupOnError", 0)) + if (g_plugin.getByte("PopupOnError", 0)) ShowNotification(MODULENAME, message, MB_OK | MB_ICONERROR); } |