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 /src/core/stduseronline | |
parent | 488214ac8af0c4aeb1a5c1d8fd48368daaf4c4c7 (diff) |
db_* functions replaced with g_plugin calls
Diffstat (limited to 'src/core/stduseronline')
-rw-r--r-- | src/core/stduseronline/src/useronline.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/stduseronline/src/useronline.cpp b/src/core/stduseronline/src/useronline.cpp index 14adec2c65..ef241c3ac9 100644 --- a/src/core/stduseronline/src/useronline.cpp +++ b/src/core/stduseronline/src/useronline.cpp @@ -49,7 +49,7 @@ static int UserOnlineSettingChanged(WPARAM hContact, LPARAM lParam) if ((newStatus == ID_STATUS_ONLINE || newStatus == ID_STATUS_FREECHAT) &&
oldStatus != ID_STATUS_ONLINE && oldStatus != ID_STATUS_FREECHAT) {
{
- DWORD ticked = db_get_dw(NULL, MODULENAME, cws->szModule, GetTickCount());
+ DWORD ticked = g_plugin.getDword(cws->szModule, GetTickCount());
// only play the sound (or show event) if this event happens at least 10 secs after the proto went from offline
if (GetTickCount() - ticked > (1000*10)) {
wchar_t tooltip[256];
@@ -77,7 +77,7 @@ static int UserOnlineAck(WPARAM, LPARAM lParam) ACKDATA * ack = (ACKDATA*) lParam;
if (ack != nullptr && ack->szModule && ack->type == ACKTYPE_STATUS && ack->result == ACKRESULT_SUCCESS && ack->hProcess == (HANDLE)ID_STATUS_OFFLINE) {
// if going from offline to any other mode, remember when it happened.
- db_set_dw(NULL, MODULENAME, ack->szModule, GetTickCount());
+ g_plugin.setDword(ack->szModule, GetTickCount());
}
return 0;
}
@@ -86,7 +86,7 @@ static int UserOnlineModulesLoaded(WPARAM, LPARAM) {
for (auto &pa : Accounts())
if (pa->IsEnabled())
- db_set_dw(NULL, MODULENAME, pa->szModuleName, GetTickCount());
+ g_plugin.setDword(pa->szModuleName, GetTickCount());
return 0;
}
@@ -100,7 +100,7 @@ static int UserOnlineAccountsChanged(WPARAM eventCode, LPARAM lParam) case PRAC_CHECKED:
// reset the counter
if (pa->IsEnabled())
- db_set_dw(NULL, MODULENAME, pa->szModuleName, GetTickCount());
+ g_plugin.setDword(pa->szModuleName, GetTickCount());
break;
}
return 0;
|