From 53fe3e46177d17b4941610de19f5cc6210700cb4 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 12 Nov 2018 21:44:56 +0300 Subject: db_* functions replaced with g_plugin calls --- plugins/MirLua/src/script.cpp | 6 +++--- plugins/MirLua/src/utils.cpp | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'plugins/MirLua/src') 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); } -- cgit v1.2.3