summaryrefslogtreecommitdiff
path: root/plugins/MirOTR
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/MirOTR')
-rw-r--r--plugins/MirOTR/src/mirotrmenu.cpp2
-rw-r--r--plugins/MirOTR/src/options.cpp4
-rw-r--r--plugins/MirOTR/src/otr.cpp4
-rw-r--r--plugins/MirOTR/src/svcs_menu.cpp10
-rw-r--r--plugins/MirOTR/src/svcs_srmm.cpp2
5 files changed, 11 insertions, 11 deletions
diff --git a/plugins/MirOTR/src/mirotrmenu.cpp b/plugins/MirOTR/src/mirotrmenu.cpp
index d5dc58db0d..bffb67d743 100644
--- a/plugins/MirOTR/src/mirotrmenu.cpp
+++ b/plugins/MirOTR/src/mirotrmenu.cpp
@@ -86,7 +86,7 @@ INT_PTR MirOTRMenuCheckService(WPARAM wParam, LPARAM)
}
}
else if (pcpp->MenuItemHandle == hHTMLConvMenuItem)
- Menu_SetChecked(hHTMLConvMenuItem, db_get_b(hContact, MODULENAME, "HTMLConv", 0) != 0);
+ Menu_SetChecked(hHTMLConvMenuItem, g_plugin.getByte(hContact, "HTMLConv", 0) != 0);
}
return TRUE;
}
diff --git a/plugins/MirOTR/src/options.cpp b/plugins/MirOTR/src/options.cpp
index ecb07d9061..f71d65e2f0 100644
--- a/plugins/MirOTR/src/options.cpp
+++ b/plugins/MirOTR/src/options.cpp
@@ -559,8 +559,8 @@ static INT_PTR CALLBACK DlgProcMirOTROptsContacts(HWND hwndDlg, UINT msg, WPARAM
PROTOACCOUNT *pa = Proto_GetAccount(proto);
ListView_SetItemText(lv, lvI.iItem, 1, pa->tszAccountName);
- ListView_SetItemText(lv, lvI.iItem, 2, (wchar_t*)policy_to_string((OtrlPolicy)db_get_dw(hContact, MODULENAME, "Policy", CONTACT_DEFAULT_POLICY)));
- ListView_SetItemText(lv, lvI.iItem, 3, (db_get_b(hContact, MODULENAME, "HTMLConv", 0)) ? TranslateW(LANG_YES) : TranslateW(LANG_NO));
+ ListView_SetItemText(lv, lvI.iItem, 2, (wchar_t*)policy_to_string((OtrlPolicy)g_plugin.getDword(hContact, "Policy", CONTACT_DEFAULT_POLICY)));
+ ListView_SetItemText(lv, lvI.iItem, 3, (g_plugin.getByte(hContact, "HTMLConv", 0)) ? TranslateW(LANG_YES) : TranslateW(LANG_NO));
}
}
}
diff --git a/plugins/MirOTR/src/otr.cpp b/plugins/MirOTR/src/otr.cpp
index 56c51be1a8..a668ba63e9 100644
--- a/plugins/MirOTR/src/otr.cpp
+++ b/plugins/MirOTR/src/otr.cpp
@@ -83,10 +83,10 @@ extern "C" {
MCONTACT hContact = (UINT_PTR)opdata;
DWORD pol;
if (hContact) {
- pol = db_get_dw(hContact, MODULENAME, "Policy", CONTACT_DEFAULT_POLICY);
+ pol = g_plugin.getDword(hContact, "Policy", CONTACT_DEFAULT_POLICY);
if (options.bHaveSecureIM && pol != OTRL_POLICY_MANUAL_MOD && pol != OTRL_POLICY_NEVER && db_get_b(hContact, "SecureIM", "StatusID", 0)) {
// if SecureIM is not disabled for this contact, MirOTR will be set to manual
- db_set_dw(hContact, MODULENAME, "Policy", OTRL_POLICY_MANUAL_MOD);
+ g_plugin.setDword(hContact, "Policy", OTRL_POLICY_MANUAL_MOD);
return OTRL_POLICY_MANUAL_MOD;
}
if (pol != CONTACT_DEFAULT_POLICY) return pol;
diff --git a/plugins/MirOTR/src/svcs_menu.cpp b/plugins/MirOTR/src/svcs_menu.cpp
index d0104d60dc..a4c7797fb5 100644
--- a/plugins/MirOTR/src/svcs_menu.cpp
+++ b/plugins/MirOTR/src/svcs_menu.cpp
@@ -11,7 +11,7 @@ int StartOTR(MCONTACT hContact)
if (!proto) return 1; // error
char *uname = contact_get_id(hContact);
if (!uname) return 1; // error
- DWORD pol = db_get_dw(hContact, MODULENAME, "Policy", CONTACT_DEFAULT_POLICY);
+ DWORD pol = g_plugin.getDword(hContact, "Policy", CONTACT_DEFAULT_POLICY);
if (pol == CONTACT_DEFAULT_POLICY) pol = options.default_policy;
lib_cs_lock();
@@ -143,10 +143,10 @@ INT_PTR SVC_ToggleHTMLOTR(WPARAM hContact, LPARAM)
if (hSub != 0)
hContact = hSub;
- if (db_get_b(hContact, MODULENAME, "HTMLConv", 0))
- db_set_b(hContact, MODULENAME, "HTMLConv", 0);
+ if (g_plugin.getByte(hContact, "HTMLConv", 0))
+ g_plugin.setByte(hContact, "HTMLConv", 0);
else
- db_set_b(hContact, MODULENAME, "HTMLConv", 1);
+ g_plugin.setByte(hContact, "HTMLConv", 1);
return 0;
}
@@ -199,7 +199,7 @@ int SVC_PrebuildContactMenu(WPARAM hContact, LPARAM)
if ((caps & PF1_IM) == 0)
return 0;
- DWORD pol = db_get_dw(hContact, MODULENAME, "Policy", CONTACT_DEFAULT_POLICY);
+ DWORD pol = g_plugin.getDword(hContact, "Policy", CONTACT_DEFAULT_POLICY);
if (pol == CONTACT_DEFAULT_POLICY)
pol = options.default_policy;
diff --git a/plugins/MirOTR/src/svcs_srmm.cpp b/plugins/MirOTR/src/svcs_srmm.cpp
index 6b4c70d1e5..34053374b2 100644
--- a/plugins/MirOTR/src/svcs_srmm.cpp
+++ b/plugins/MirOTR/src/svcs_srmm.cpp
@@ -65,7 +65,7 @@ void SetEncryptionStatus(MCONTACT hContact, TrustLevel level)
Srmm_ModifyIcon(hContact, &sid2);
Srmm_SetButtonState(hContact, &button);
- db_set_dw(hContact, MODULENAME, "TrustLevel", level);
+ g_plugin.setDword(hContact, "TrustLevel", level);
if (!chat_room) {
MCONTACT hMeta = db_mc_getMeta(hContact);