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/NewsAggregator/Src/Update.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'plugins/NewsAggregator/Src/Update.cpp') diff --git a/plugins/NewsAggregator/Src/Update.cpp b/plugins/NewsAggregator/Src/Update.cpp index 7809904ad9..cde3ef2686 100644 --- a/plugins/NewsAggregator/Src/Update.cpp +++ b/plugins/NewsAggregator/Src/Update.cpp @@ -33,7 +33,7 @@ void CALLBACK timerProc(HWND, UINT, UINT_PTR, DWORD) for (auto &hContact : Contacts(MODULENAME)) { if (db_get_dw(hContact, MODULENAME, "UpdateTime", DEFAULT_UPDATE_TIME)) { double diff = difftime(time(0), (time_t)db_get_dw(hContact, MODULENAME, "LastCheck", 0)); - if (db_get_b(NULL, MODULENAME, "AutoUpdate", 1) != 0 && diff >= db_get_dw(hContact, MODULENAME, "UpdateTime", DEFAULT_UPDATE_TIME) * 60) { + if (g_plugin.getByte("AutoUpdate", 1) != 0 && diff >= db_get_dw(hContact, MODULENAME, "UpdateTime", DEFAULT_UPDATE_TIME) * 60) { UpdateListAdd(hContact); HaveUpdates = TRUE; } @@ -51,8 +51,8 @@ void CALLBACK timerProc2(HWND, UINT, UINT_PTR, DWORD) KillTimer(nullptr, timerId); ThreadRunning = FALSE; - if (db_get_b(NULL, MODULENAME, "AutoUpdate", 1) && !Miranda_IsTerminated()) { - if (db_get_b(NULL, MODULENAME, "StartupRetrieve", 1)) + if (g_plugin.getByte("AutoUpdate", 1) && !Miranda_IsTerminated()) { + if (g_plugin.getByte("StartupRetrieve", 1)) CheckAllFeeds(0, 1); timerId = SetTimer(nullptr, 0, 30000, (TIMERPROC)timerProc); } -- cgit v1.2.3