summaryrefslogtreecommitdiff
path: root/plugins/StopSpamPlus/src/services.cpp
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2015-04-23 07:41:44 +0000
committerKirill Volinsky <mataes2007@gmail.com>2015-04-23 07:41:44 +0000
commite2ce3313fe054a776d6757b69930861d9fd4406c (patch)
tree751f545d1f0d2fb0209a52758e375ab3b32f04bf /plugins/StopSpamPlus/src/services.cpp
parentb962a9cd6553fc816a61f4ff17b68445a84dabb2 (diff)
warning fix
stopstam works only with real protocols git-svn-id: http://svn.miranda-ng.org/main/trunk@13050 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/StopSpamPlus/src/services.cpp')
-rw-r--r--plugins/StopSpamPlus/src/services.cpp29
1 files changed, 14 insertions, 15 deletions
diff --git a/plugins/StopSpamPlus/src/services.cpp b/plugins/StopSpamPlus/src/services.cpp
index 9e9145f2b6..63fc504c18 100644
--- a/plugins/StopSpamPlus/src/services.cpp
+++ b/plugins/StopSpamPlus/src/services.cpp
@@ -21,11 +21,11 @@ INT_PTR IsContactPassed(WPARAM hContact, LPARAM /*lParam*/)
return CS_NOTPASSED;
}
-INT_PTR RemoveTempContacts(WPARAM wParam,LPARAM lParam)
+INT_PTR RemoveTempContacts(WPARAM, LPARAM lParam)
{
- for (MCONTACT hContact = db_find_first(); hContact; ) {
+ for (MCONTACT hContact = db_find_first(); hContact;) {
MCONTACT hNext = db_find_next(hContact);
- ptrT szGroup( db_get_tsa( hContact, "CList", "Group"));
+ ptrT szGroup(db_get_tsa(hContact, "CList", "Group"));
if (db_get_b(hContact, "CList", "NotOnList", 0) || (szGroup != NULL && (_tcsstr(szGroup, _T("Not In List")) || _tcsstr(szGroup, TranslateT("Not In List"))))) {
char *szProto = GetContactProto(hContact);
@@ -36,43 +36,42 @@ INT_PTR RemoveTempContacts(WPARAM wParam,LPARAM lParam)
int status = CallProtoService(szProto, PS_GETSTATUS, 0, 0);
if (status == ID_STATUS_OFFLINE || IsStatusConnecting(status))
// Set a flag so we remember to delete the contact when the protocol goes online the next time
- db_set_b( hContact, "CList", "Delete", 1 );
+ db_set_b(hContact, "CList", "Delete", 1);
else
- CallService(MS_DB_CONTACT_DELETE, hContact, 0 );
+ CallService(MS_DB_CONTACT_DELETE, hContact, 0);
}
}
}
hContact = hNext;
}
-
+
int hGroup = 1;
char *group_name;
do {
group_name = (char *)CallService(MS_CLIST_GROUPGETNAME, (WPARAM)hGroup, 0);
if (group_name != NULL && strstr(group_name, "Not In List")) {
BYTE ConfirmDelete = db_get_b(NULL, "CList", "ConfirmDelete", SETTING_CONFIRMDELETE_DEFAULT);
- if ( ConfirmDelete )
- db_set_b( NULL, "CList", "ConfirmDelete", 0 );
+ if (ConfirmDelete)
+ db_set_b(NULL, "CList", "ConfirmDelete", 0);
- CallService(MS_CLIST_GROUPDELETE, (WPARAM)hGroup, 0 );
- if ( ConfirmDelete )
- db_set_b( NULL, "CList", "ConfirmDelete", ConfirmDelete );
+ CallService(MS_CLIST_GROUPDELETE, (WPARAM)hGroup, 0);
+ if (ConfirmDelete)
+ db_set_b(NULL, "CList", "ConfirmDelete", ConfirmDelete);
break;
}
hGroup++;
- }
- while( group_name );
+ } while (group_name);
if (!lParam)
MessageBox(NULL, TranslateT("Complete"), TranslateT(pluginName), MB_ICONINFORMATION);
return 0;
}
-int OnSystemModulesLoaded(WPARAM wParam, LPARAM lParam)
+int OnSystemModulesLoaded(WPARAM, LPARAM)
{
UnhookEvent(hLoadHook);
if (plSets->RemTmpAll.Get())
- RemoveTempContacts(0,1);
+ RemoveTempContacts(0, 1);
return 0;
}