From 4469fe9e91fcc22314cd1ccd30faf557690f7657 Mon Sep 17 00:00:00 2001 From: sss Date: Fri, 13 Mar 2009 23:48:00 +0000 Subject: checking for old icq contacts git-svn-id: http://172.18.13.13/svn/mim_plugs@11 63852ff1-2cfd-40b9-8011-e561a9d89b1c --- stopspam_mod/trunk/stopspam.cpp | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to 'stopspam_mod/trunk/stopspam.cpp') diff --git a/stopspam_mod/trunk/stopspam.cpp b/stopspam_mod/trunk/stopspam.cpp index c04cc6f..9bcfd08 100644 --- a/stopspam_mod/trunk/stopspam.cpp +++ b/stopspam_mod/trunk/stopspam.cpp @@ -22,6 +22,13 @@ MIRANDA_HOOK_EVENT(ME_DB_EVENT_ADDED, wParam, lParam) dbei.pBlob = new BYTE[dbei.cbBlob]; CallService(MS_DB_EVENT_GET, lParam, (LPARAM)&dbei); + if(DBGetContactSettingWord(hContact, dbei.szModule, "ServerId", 0)) + { + DBDeleteContactSetting(hContact, "CList", "NotOnList"); + delete dbei.pBlob; + return 0; + } + // if event is in protocol that is not despammed if(!ProtoInList(dbei.szModule)) { delete dbei.pBlob; @@ -113,7 +120,7 @@ MIRANDA_HOOK_EVENT(ME_DB_EVENT_FILTER_ADD, w, l) else if(dbei->flags & DBEF_READ) // ...let the event go its way return 0; - //mark contact which we trying to contact for exclude from chack + //mark contact which we trying to contact for exclude from check else if((dbei->flags & DBEF_SENT) && DBGetContactSettingByte(hContact, "CList", "NotOnList", 0) && (!gbMaxQuestCount || DBGetContactSettingDword(hContact, pluginName, "QuestionCount", 0) < gbMaxQuestCount) && gbExclude) { @@ -200,11 +207,14 @@ MIRANDA_HOOK_EVENT(ME_DB_EVENT_FILTER_ADD, w, l) } else { - if (gbDosServiceIntegration && gbDosServiceExist) + if (gbDosServiceExist) { - int i; - i = rand()%255*13; - CallService(MS_DOS_SERVICE, (WPARAM)hContact, (LPARAM)i); + if(gbDosServiceIntegration) + { + int i; + i = rand()%255*13; + CallService(MS_DOS_SERVICE, (WPARAM)hContact, (LPARAM)i); + } } if(gbIgnoreContacts) { -- cgit v1.2.3