From a6b9f6570b4cb4a425f91d4694e6b027f12cc8b7 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 14 Nov 2018 15:57:47 +0300 Subject: hContact, MODULENAME -> g_plugin --- plugins/Spamotron/src/options.cpp | 2 +- plugins/Spamotron/src/spamotron.cpp | 6 +++--- plugins/Spamotron/src/utils.cpp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'plugins/Spamotron/src') diff --git a/plugins/Spamotron/src/options.cpp b/plugins/Spamotron/src/options.cpp index 83e8a1c4b4..0cff0e8420 100644 --- a/plugins/Spamotron/src/options.cpp +++ b/plugins/Spamotron/src/options.cpp @@ -6,7 +6,7 @@ wchar_t* _getCOptS(wchar_t *buf, unsigned int buflen, MCONTACT hContact, const c { DBVARIANT dbv = {0}; wcsnset(buf, 0, buflen); - if (db_get_ws(hContact, MODULENAME, option, &dbv) != 0) + if (g_plugin.getWString(hContact, option, &dbv) != 0) wcsncpy(buf, def, min(buflen, mir_wstrlen(def)+1)); else if (dbv.type == DBVT_WCHAR) { wcsncpy(buf, dbv.pwszVal, min(buflen, mir_wstrlen(dbv.pwszVal)+1)); diff --git a/plugins/Spamotron/src/spamotron.cpp b/plugins/Spamotron/src/spamotron.cpp index cb0fb0874e..1f63559f90 100644 --- a/plugins/Spamotron/src/spamotron.cpp +++ b/plugins/Spamotron/src/spamotron.cpp @@ -238,9 +238,9 @@ int OnDBEventFilterAdd(WPARAM wParam, LPARAM lParam) _dbei->flags = 0; _dbei->pBlob = _dbv.pbVal + sizeof(DWORD); db_event_add(hContact,_dbei); - db_unset(hContact, MODULENAME, "AuthEvent"); - db_unset(hContact, MODULENAME, "AuthEventPending"); - db_unset(hContact, MODULENAME, "AuthEventModule"); + g_plugin.delSetting(hContact, "AuthEvent"); + g_plugin.delSetting(hContact, "AuthEventPending"); + g_plugin.delSetting(hContact, "AuthEventModule"); mir_free(szAuthEventModule); free(_dbei); } diff --git a/plugins/Spamotron/src/utils.cpp b/plugins/Spamotron/src/utils.cpp index 6ae1ca6d84..39f4fd35f5 100644 --- a/plugins/Spamotron/src/utils.cpp +++ b/plugins/Spamotron/src/utils.cpp @@ -505,6 +505,6 @@ void MarkUnread(MCONTACT hContact) db_event_add(hContact,&_dbei); } db_free(&_dbv); - db_unset(hContact, MODULENAME, "LastMsgEvents"); + g_plugin.delSetting(hContact, "LastMsgEvents"); } } -- cgit v1.2.3