diff options
Diffstat (limited to 'stopspam_mod/trunk')
-rw-r--r-- | stopspam_mod/trunk/stopspam.cpp | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/stopspam_mod/trunk/stopspam.cpp b/stopspam_mod/trunk/stopspam.cpp index dc68edb..c04cc6f 100644 --- a/stopspam_mod/trunk/stopspam.cpp +++ b/stopspam_mod/trunk/stopspam.cpp @@ -4,10 +4,7 @@ extern TCHAR const * defQuestion; MIRANDA_HOOK_EVENT(ME_DB_CONTACT_ADDED, w, l)
{
- if(gbDelNotInList)
- if(DBGetContactSettingStringPAN_A((HANDLE)w, "CList", "Group", "") == "Not In List")
- CallService(MS_DB_CONTACT_DELETE, (WPARAM)w, 0);
- DBWriteContactSettingByte((HANDLE)w, "CList", "NotOnList", 1);
+ DBWriteContactSettingByte((HANDLE)w, "CList", "NotOnList", 1);
return 0;
}
@@ -86,9 +83,20 @@ MIRANDA_HOOK_EVENT(ME_DB_EVENT_FILTER_ADD, w, l) // if event is in protocol that is not despammed
if(!ProtoInList(dbei->szModule))
+ {
+ DBDeleteContactSetting(hContact, "CList", "NotOnList");
// ...let the event go its way
return 0;
+ }
//do not check excluded contact
+
+ if(gbDelNotInList)
+ if(DBGetContactSettingStringPAN_A((HANDLE)w, "CList", "Group", "") == "Not In List")
+ {
+ CallService(MS_DB_CONTACT_DELETE, (WPARAM)w, 0);
+ return 1;
+ }
+
else if(DBGetContactSettingByte(hContact, pluginName, "Answered", 0))
return 0;
else if(DBGetContactSettingByte(hContact, pluginName, "Excluded", 0))
|