diff options
Diffstat (limited to 'stopspam_mod/branches/0.0.1.5/stopspam.cpp')
-rw-r--r-- | stopspam_mod/branches/0.0.1.5/stopspam.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/stopspam_mod/branches/0.0.1.5/stopspam.cpp b/stopspam_mod/branches/0.0.1.5/stopspam.cpp index dc68edb..ff50864 100644 --- a/stopspam_mod/branches/0.0.1.5/stopspam.cpp +++ b/stopspam_mod/branches/0.0.1.5/stopspam.cpp @@ -4,9 +4,6 @@ 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);
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))
|