summaryrefslogtreecommitdiff
path: root/plugins/Non-IM Contact/src/timer.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-11-12 21:44:56 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-11-12 21:44:56 +0300
commit53fe3e46177d17b4941610de19f5cc6210700cb4 (patch)
treeb67a6bc208dad141f9db14035cd7e42ff2a51872 /plugins/Non-IM Contact/src/timer.cpp
parent488214ac8af0c4aeb1a5c1d8fd48368daaf4c4c7 (diff)
db_* functions replaced with g_plugin calls
Diffstat (limited to 'plugins/Non-IM Contact/src/timer.cpp')
-rw-r--r--plugins/Non-IM Contact/src/timer.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/Non-IM Contact/src/timer.cpp b/plugins/Non-IM Contact/src/timer.cpp
index b076d9284f..ba658997d6 100644
--- a/plugins/Non-IM Contact/src/timer.cpp
+++ b/plugins/Non-IM Contact/src/timer.cpp
@@ -13,13 +13,13 @@ void timerFunc(void*)
{
char text[512], fn[16], szFileName[MAX_PATH], temp[MAX_PATH];
- int timerCount = db_get_w(NULL, MODNAME, "timerCount", 1) + 1;
+ int timerCount = db_get_w(0, MODNAME, "timerCount", 1) + 1;
if (LCStatus == ID_STATUS_OFFLINE) {
killTimer();
return;
}
- db_set_w(NULL, MODNAME, "timerCount", (WORD)timerCount);
+ db_set_w(0, MODNAME, "timerCount", (WORD)timerCount);
/* update the web pages*/
for (int i = 0;; i++) {
@@ -29,7 +29,7 @@ void timerFunc(void*)
if (!strncmp("http://", text, mir_strlen("http://")) || !strncmp("https://", text, mir_strlen("https://"))) {
mir_snprintf(fn, "fn%d_timer", i);
- int timer = db_get_w(NULL, MODNAME, fn, 60);
+ int timer = db_get_w(0, MODNAME, fn, 60);
if (timer && !(timerCount % timer)) {
if (!InternetDownloadFile(text)) {
mir_snprintf(szFileName, "%s\\plugins\\fn%d.html", getMimDir(temp), i);
@@ -77,7 +77,7 @@ int startTimer(int interval)
int killTimer()
{
if (timerId != 0) {
- db_set_w(NULL, MODNAME, "timerCount", 0);
+ db_set_w(0, MODNAME, "timerCount", 0);
KillTimer(nullptr, timerId);
timerId = 0;
}