diff options
author | George Hazan <ghazan@miranda.im> | 2022-07-31 18:07:27 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2022-07-31 18:07:27 +0300 |
commit | 500dd4848842f6d4207584417448586d060fbd6a (patch) | |
tree | 569ac641e814da1d706d36b12eaf35183a3ce7a5 /plugins/StopSpamPlus | |
parent | b47e4b4b32698470bf52c0dc1c2d1af56c46c9b5 (diff) |
Contact: group of functions gathered into the personal namespace
Diffstat (limited to 'plugins/StopSpamPlus')
-rw-r--r-- | plugins/StopSpamPlus/src/events.cpp | 16 | ||||
-rw-r--r-- | plugins/StopSpamPlus/src/services.cpp | 4 |
2 files changed, 10 insertions, 10 deletions
diff --git a/plugins/StopSpamPlus/src/events.cpp b/plugins/StopSpamPlus/src/events.cpp index 8985820c07..7ce72a91b9 100644 --- a/plugins/StopSpamPlus/src/events.cpp +++ b/plugins/StopSpamPlus/src/events.cpp @@ -19,7 +19,7 @@ int OnDbEventAdded(WPARAM, LPARAM lParam) // if request is from unknown or not marked Answered contact
//and if I don't sent message to this contact
- if (!Contact_OnList(hcntct) && !g_plugin.getByte(hcntct, DB_KEY_ANSWERED) && !IsExistMyMessage(hcntct)) {
+ if (!Contact::OnList(hcntct) && !g_plugin.getByte(hcntct, DB_KEY_ANSWERED) && !IsExistMyMessage(hcntct)) {
if (!g_sets.HandleAuthReq) {
char *buf = mir_utf8encodeW(variables_parse(g_sets.getReply(), hcntct).c_str());
ProtoChainSend(hcntct, PSS_MESSAGE, 0, (LPARAM)buf);
@@ -29,8 +29,8 @@ int OnDbEventAdded(WPARAM, LPARAM lParam) // ...send message
CallProtoService(dbei.szModule, PS_AUTHDENY, hDbEvent, (LPARAM)_T2A(variables_parse(g_sets.getReply(), hcntct).c_str()));
- Contact_RemoveFromList(hcntct);
- Contact_Hide(hcntct);
+ Contact::RemoveFromList(hcntct);
+ Contact::Hide(hcntct);
if (!g_sets.HistLog)
db_event_delete(hDbEvent);
return 1;
@@ -63,7 +63,7 @@ int OnDbEventFilterAdd(WPARAM w, LPARAM l) // checking if message from self-added contact
//Contact in Not in list icq group
- if (Contact_OnList(hContact) && db_get_w(hContact, dbei->szModule, "SrvGroupId", -1) != 1)
+ if (Contact::OnList(hContact) && db_get_w(hContact, dbei->szModule, "SrvGroupId", -1) != 1)
return 0;
//if I sent message to this contact
@@ -101,14 +101,14 @@ int OnDbEventFilterAdd(WPARAM w, LPARAM l) // if message equal right answer...
if (g_sets.AnswNotCaseSens ? !mir_wstrcmpi(message.c_str(), answer.c_str()) : !mir_wstrcmp(message.c_str(), answer.c_str())) {
// unhide contact
- Contact_Hide(hContact, false);
+ Contact::Hide(hContact, false);
// mark contact as Answered
g_plugin.setByte(hContact, DB_KEY_ANSWERED, 1);
//add contact permanently
if (g_sets.AddPermanent)
- Contact_PutOnList(hContact);
+ Contact::PutOnList(hContact);
// send congratulation
@@ -142,8 +142,8 @@ int OnDbEventFilterAdd(WPARAM w, LPARAM l) }
// hide contact from contact list
- Contact_RemoveFromList(hContact);
- Contact_Hide(hContact);
+ Contact::RemoveFromList(hContact);
+ Contact::Hide(hContact);
// mark message as read and allow to insert it into the history
dbei->flags |= DBEF_READ;
diff --git a/plugins/StopSpamPlus/src/services.cpp b/plugins/StopSpamPlus/src/services.cpp index 4a9a0417de..90a14444a1 100644 --- a/plugins/StopSpamPlus/src/services.cpp +++ b/plugins/StopSpamPlus/src/services.cpp @@ -12,7 +12,7 @@ INT_PTR IsContactPassed(WPARAM hContact, LPARAM /*lParam*/) if (g_plugin.getByte(hContact, DB_KEY_ANSWERED))
return CS_PASSED;
- if (Contact_OnList(hContact) && db_get_w(hContact, szProto, "SrvGroupId", -1) != 1)
+ if (Contact::OnList(hContact) && db_get_w(hContact, szProto, "SrvGroupId", -1) != 1)
return CS_PASSED;
if (IsExistMyMessage(hContact))
@@ -27,7 +27,7 @@ INT_PTR RemoveTempContacts(WPARAM, LPARAM lParam) MCONTACT hNext = db_find_next(hContact);
ptrW szGroup(Clist_GetGroup(hContact));
- if (!Contact_OnList(hContact) || (szGroup != NULL && (wcsstr(szGroup, L"Not In List") || wcsstr(szGroup, TranslateT("Not In List"))))) {
+ if (!Contact::OnList(hContact) || (szGroup != NULL && (wcsstr(szGroup, L"Not In List") || wcsstr(szGroup, TranslateT("Not In List"))))) {
char *szProto = Proto_GetBaseAccountName(hContact);
if (szProto != nullptr) {
// Check if protocol uses server side lists
|