summaryrefslogtreecommitdiff
path: root/stopspam_mod/trunk/stopspam.cpp
diff options
context:
space:
mode:
authorsss <sss@63852ff1-2cfd-40b9-8011-e561a9d89b1c>2009-03-12 21:03:28 +0000
committersss <sss@63852ff1-2cfd-40b9-8011-e561a9d89b1c>2009-03-12 21:03:28 +0000
commitf2912ed143f0add2bbe63fb17efabc048b4f0d8e (patch)
treeef391d0ac01500e52552ea9f0761d161c5cedaa5 /stopspam_mod/trunk/stopspam.cpp
parent748c9f7d07911e1c9887b9d46c6f24f6762de057 (diff)
this is some kind of fix ?, hm..., i do not remember now, and too lazy for reading code sorry all )))
git-svn-id: http://172.18.13.13/svn/mim_plugs@9 63852ff1-2cfd-40b9-8011-e561a9d89b1c
Diffstat (limited to 'stopspam_mod/trunk/stopspam.cpp')
-rw-r--r--stopspam_mod/trunk/stopspam.cpp16
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))