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/BuddyPounce/src/main.cpp | |
parent | 488214ac8af0c4aeb1a5c1d8fd48368daaf4c4c7 (diff) |
db_* functions replaced with g_plugin calls
Diffstat (limited to 'plugins/BuddyPounce/src/main.cpp')
-rw-r--r-- | plugins/BuddyPounce/src/main.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins/BuddyPounce/src/main.cpp b/plugins/BuddyPounce/src/main.cpp index 90b28e8e42..03c5bb3fe0 100644 --- a/plugins/BuddyPounce/src/main.cpp +++ b/plugins/BuddyPounce/src/main.cpp @@ -32,7 +32,7 @@ int MsgAck(WPARAM, LPARAM lParam) if (ack && ack->type == ACKTYPE_MESSAGE) {
if (ack->hProcess == (HANDLE)WindowList_Find(hWindowList, ack->hContact)) {
- if (db_get_b(NULL, MODULENAME, "ShowDeliveryMessages", 1))
+ if (g_plugin.getByte("ShowDeliveryMessages", 1))
CreateMessageAcknowlegedWindow(ack->hContact, ack->result == ACKRESULT_SUCCESS);
if (ack->result == ACKRESULT_SUCCESS) {
// wrtie it to the DB
@@ -164,7 +164,7 @@ int UserOnlineSettingChanged(WPARAM hContact, LPARAM lParam) INT_PTR BuddyPounceMenuCommand(WPARAM hContact, LPARAM)
{
- if (db_get_b(NULL, MODULENAME, "UseAdvanced", 0) || db_get_b(hContact, MODULENAME, "UseAdvanced", 0))
+ if (g_plugin.getByte("UseAdvanced", 0) || db_get_b(hContact, MODULENAME, "UseAdvanced", 0))
CreateDialogParam(g_plugin.getInst(), MAKEINTRESOURCE(IDD_POUNCE), nullptr, BuddyPounceDlgProc, hContact);
else
CreateDialogParam(g_plugin.getInst(), MAKEINTRESOURCE(IDD_POUNCE_SIMPLE), nullptr, BuddyPounceSimpleDlgProc, hContact);
@@ -176,10 +176,10 @@ INT_PTR AddSimpleMessage(WPARAM wParam, LPARAM lParam) MCONTACT hContact = wParam;
wchar_t* message = (wchar_t*)lParam;
db_set_ws(hContact, MODULENAME, "PounceMsg", message);
- db_set_w(hContact, MODULENAME, "SendIfMyStatusIsFLAG", (WORD)db_get_w(NULL, MODULENAME, "SendIfMyStatusIsFLAG", 1));
- db_set_w(hContact, MODULENAME, "SendIfTheirStatusIsFLAG", (WORD)db_get_w(NULL, MODULENAME, "SendIfTheirStatusIsFLAG", 1));
- db_set_b(hContact, MODULENAME, "Reuse", (BYTE)db_get_b(NULL, MODULENAME, "Reuse", 0));
- db_set_b(hContact, MODULENAME, "GiveUpDays", (BYTE)db_get_b(NULL, MODULENAME, "GiveUpDays", 0));
+ db_set_w(hContact, MODULENAME, "SendIfMyStatusIsFLAG", (WORD)g_plugin.getWord("SendIfMyStatusIsFLAG", 1));
+ db_set_w(hContact, MODULENAME, "SendIfTheirStatusIsFLAG", (WORD)g_plugin.getWord("SendIfTheirStatusIsFLAG", 1));
+ db_set_b(hContact, MODULENAME, "Reuse", (BYTE)g_plugin.getByte("Reuse", 0));
+ db_set_b(hContact, MODULENAME, "GiveUpDays", (BYTE)g_plugin.getByte("GiveUpDays", 0));
db_set_dw(hContact, MODULENAME, "GiveUpDate", (DWORD)(db_get_b(hContact, MODULENAME, "GiveUpDays", 0)*SECONDSINADAY));
return 0;
}
|