diff options
Diffstat (limited to 'stopspam_mod/trunk/stopspam.cpp')
-rw-r--r-- | stopspam_mod/trunk/stopspam.cpp | 20 |
1 files changed, 15 insertions, 5 deletions
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)
{
|