summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--stopspam_mod/trunk/init.cpp2
-rw-r--r--stopspam_mod/trunk/stopspam.cpp20
-rw-r--r--stopspam_mod/trunk/stopspam.rc6
3 files changed, 19 insertions, 9 deletions
diff --git a/stopspam_mod/trunk/init.cpp b/stopspam_mod/trunk/init.cpp
index 0022f00..e242048 100644
--- a/stopspam_mod/trunk/init.cpp
+++ b/stopspam_mod/trunk/init.cpp
@@ -38,7 +38,7 @@ UTF8_INTERFACE utfi;
PLUGININFOEX pluginInfoEx = {
sizeof(PLUGININFOEX),
pluginName" mod",
- PLUGIN_MAKE_VERSION(0, 0, 1, 5),
+ PLUGIN_MAKE_VERSION(0, 0, 1, 6),
pluginDescription,
"Roman Miklashevsky",
"sss123next@list.ru",
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)
{
diff --git a/stopspam_mod/trunk/stopspam.rc b/stopspam_mod/trunk/stopspam.rc
index e7b83fe..726349f 100644
--- a/stopspam_mod/trunk/stopspam.rc
+++ b/stopspam_mod/trunk/stopspam.rc
@@ -144,12 +144,12 @@ BEGIN
VALUE "Comments", "Licensed under the terms of the GNU General Public License"
VALUE "CompanyName", " "
VALUE "FileDescription", "StopSpam plugin for Miranda IM"
- VALUE "FileVersion", "0.0.1 alpha build #0"
+ VALUE "FileVersion", "0.0.1.6 alpha build #0"
VALUE "InternalName", "stopspam"
- VALUE "LegalCopyright", "Copyright © 2000-2008 Miranda IM Project. This software is released under the terms of the GNU General Public License."
+ VALUE "LegalCopyright", "Copyright © 2000-2009 Miranda IM Project. This software is released under the terms of the GNU General Public License."
VALUE "OriginalFilename", "stopspam.dll"
VALUE "ProductName", "StopSpam"
- VALUE "ProductVersion", "0.0.1 alpha build #0"
+ VALUE "ProductVersion", "0.0.1.6 alpha build #0"
END
END
BLOCK "VarFileInfo"