From f2912ed143f0add2bbe63fb17efabc048b4f0d8e Mon Sep 17 00:00:00 2001 From: sss Date: Thu, 12 Mar 2009 21:03:28 +0000 Subject: 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 --- stopspam_mod/trunk/stopspam.cpp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'stopspam_mod/trunk/stopspam.cpp') 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)) -- cgit v1.2.3