summaryrefslogtreecommitdiff
path: root/stopspam_mod/branches
diff options
context:
space:
mode:
authorsss <sss@63852ff1-2cfd-40b9-8011-e561a9d89b1c>2009-04-04 11:13:52 +0000
committersss <sss@63852ff1-2cfd-40b9-8011-e561a9d89b1c>2009-04-04 11:13:52 +0000
commit6fe89c25874a40e9383dfaccb14f360971fe694b (patch)
tree91afdeea9fdac8903513b1cbf52cb86189fdf7e3 /stopspam_mod/branches
parent1d2aaa9958c1dc1514cb9795c668e15846ea0cc5 (diff)
git-svn-id: http://172.18.13.13/svn/mim_plugs@17 63852ff1-2cfd-40b9-8011-e561a9d89b1c
Diffstat (limited to 'stopspam_mod/branches')
-rw-r--r--stopspam_mod/branches/0.0.1.6/BUGS.txt (renamed from stopspam_mod/branches/0.0.1.5/BUGS.txt)0
-rw-r--r--stopspam_mod/branches/0.0.1.6/Makefile (renamed from stopspam_mod/branches/0.0.1.5/Makefile)0
-rw-r--r--stopspam_mod/branches/0.0.1.6/eventhooker.cpp (renamed from stopspam_mod/branches/0.0.1.5/eventhooker.cpp)0
-rw-r--r--stopspam_mod/branches/0.0.1.6/eventhooker.h (renamed from stopspam_mod/branches/0.0.1.5/eventhooker.h)0
-rw-r--r--stopspam_mod/branches/0.0.1.6/globals.h (renamed from stopspam_mod/branches/0.0.1.5/globals.h)0
-rw-r--r--stopspam_mod/branches/0.0.1.6/headers.h (renamed from stopspam_mod/branches/0.0.1.5/headers.h)0
-rw-r--r--stopspam_mod/branches/0.0.1.6/init.cpp (renamed from stopspam_mod/branches/0.0.1.5/init.cpp)63
-rw-r--r--stopspam_mod/branches/0.0.1.6/options.cpp (renamed from stopspam_mod/branches/0.0.1.5/options.cpp)6
-rw-r--r--stopspam_mod/branches/0.0.1.6/options.h (renamed from stopspam_mod/branches/0.0.1.5/options.h)0
-rw-r--r--stopspam_mod/branches/0.0.1.6/resource.h (renamed from stopspam_mod/branches/0.0.1.5/resource.h)0
-rw-r--r--stopspam_mod/branches/0.0.1.6/stopspam.cpp (renamed from stopspam_mod/branches/0.0.1.5/stopspam.cpp)45
-rw-r--r--stopspam_mod/branches/0.0.1.6/stopspam.h (renamed from stopspam_mod/branches/0.0.1.5/stopspam.h)0
-rw-r--r--stopspam_mod/branches/0.0.1.6/stopspam.rc (renamed from stopspam_mod/branches/0.0.1.5/stopspam.rc)6
-rw-r--r--stopspam_mod/branches/0.0.1.6/stopspam_8.sln (renamed from stopspam_mod/branches/0.0.1.5/stopspam_8.sln)0
-rw-r--r--stopspam_mod/branches/0.0.1.6/stopspam_8.vcproj (renamed from stopspam_mod/branches/0.0.1.5/stopspam_8.vcproj)0
-rw-r--r--stopspam_mod/branches/0.0.1.6/stopspam_9.sln (renamed from stopspam_mod/branches/0.0.1.5/stopspam_9.sln)0
-rw-r--r--stopspam_mod/branches/0.0.1.6/stopspam_9.vcproj (renamed from stopspam_mod/branches/0.0.1.5/stopspam_9.vcproj)0
-rw-r--r--stopspam_mod/branches/0.0.1.6/utilities.cpp (renamed from stopspam_mod/branches/0.0.1.5/utilities.cpp)0
-rw-r--r--stopspam_mod/branches/0.0.1.6/utilities.h (renamed from stopspam_mod/branches/0.0.1.5/utilities.h)0
-rw-r--r--stopspam_mod/branches/0.0.1.6/version.h (renamed from stopspam_mod/branches/0.0.1.5/version.h)0
20 files changed, 89 insertions, 31 deletions
diff --git a/stopspam_mod/branches/0.0.1.5/BUGS.txt b/stopspam_mod/branches/0.0.1.6/BUGS.txt
index d17bd4a..d17bd4a 100644
--- a/stopspam_mod/branches/0.0.1.5/BUGS.txt
+++ b/stopspam_mod/branches/0.0.1.6/BUGS.txt
diff --git a/stopspam_mod/branches/0.0.1.5/Makefile b/stopspam_mod/branches/0.0.1.6/Makefile
index fc08dd9..fc08dd9 100644
--- a/stopspam_mod/branches/0.0.1.5/Makefile
+++ b/stopspam_mod/branches/0.0.1.6/Makefile
diff --git a/stopspam_mod/branches/0.0.1.5/eventhooker.cpp b/stopspam_mod/branches/0.0.1.6/eventhooker.cpp
index f29e5b7..f29e5b7 100644
--- a/stopspam_mod/branches/0.0.1.5/eventhooker.cpp
+++ b/stopspam_mod/branches/0.0.1.6/eventhooker.cpp
diff --git a/stopspam_mod/branches/0.0.1.5/eventhooker.h b/stopspam_mod/branches/0.0.1.6/eventhooker.h
index 2174691..2174691 100644
--- a/stopspam_mod/branches/0.0.1.5/eventhooker.h
+++ b/stopspam_mod/branches/0.0.1.6/eventhooker.h
diff --git a/stopspam_mod/branches/0.0.1.5/globals.h b/stopspam_mod/branches/0.0.1.6/globals.h
index 9ae64b3..9ae64b3 100644
--- a/stopspam_mod/branches/0.0.1.5/globals.h
+++ b/stopspam_mod/branches/0.0.1.6/globals.h
diff --git a/stopspam_mod/branches/0.0.1.5/headers.h b/stopspam_mod/branches/0.0.1.6/headers.h
index 088f622..088f622 100644
--- a/stopspam_mod/branches/0.0.1.5/headers.h
+++ b/stopspam_mod/branches/0.0.1.6/headers.h
diff --git a/stopspam_mod/branches/0.0.1.5/init.cpp b/stopspam_mod/branches/0.0.1.6/init.cpp
index 54a826d..fc32742 100644
--- a/stopspam_mod/branches/0.0.1.5/init.cpp
+++ b/stopspam_mod/branches/0.0.1.6/init.cpp
@@ -14,7 +14,7 @@ BOOL gbIgnoreContacts = 0;
BOOL gbExclude = 1;
BOOL gbDelExcluded = 0;
BOOL gbDosServiceIntegration = 0;
-BOOL gbDelNotInList = 0;
+//BOOL gbDelNotInList = 0;
tstring gbSpammersGroup = _T("Spammers");
tstring gbQuestion;
tstring gbAnswer;
@@ -37,8 +37,8 @@ UTF8_INTERFACE utfi;
PLUGININFOEX pluginInfoEx = {
sizeof(PLUGININFOEX),
- pluginName" mod",
- PLUGIN_MAKE_VERSION(0, 0, 1, 5),
+ 0,
+ PLUGIN_MAKE_VERSION(0, 0, 1, 6),
pluginDescription,
"Roman Miklashevsky",
"sss123next@list.ru",
@@ -49,10 +49,65 @@ PLUGININFOEX pluginInfoEx = {
MIID_STOPSPAM
};
+
+char *date()
+{
+ static char d[11];
+ char *tmp = __DATE__, m[4], mn[3] = "01";
+ m[0]=tmp[0];
+ m[1]=tmp[1];
+ m[2]=tmp[2];
+ if(strstr(m,"Jan"))
+ strcpy(mn,"01");
+ else if(strstr(m,"Feb"))
+ strcpy(mn,"02");
+ else if(strstr(m,"Mar"))
+ strcpy(mn,"03");
+ else if(strstr(m,"Apr"))
+ strcpy(mn,"04");
+ else if(strstr(m,"May"))
+ strcpy(mn,"05");
+ else if(strstr(m,"Jun"))
+ strcpy(mn,"06");
+ else if(strstr(m,"Jul"))
+ strcpy(mn,"07");
+ else if(strstr(m,"Aug"))
+ strcpy(mn,"08");
+ else if(strstr(m,"Sep"))
+ strcpy(mn,"09");
+ else if(strstr(m,"Oct"))
+ strcpy(mn,"10");
+ else if(strstr(m,"Nov"))
+ strcpy(mn,"11");
+ else if(strstr(m,"Dec"))
+ strcpy(mn,"12");
+ d[0]=tmp[7];
+ d[1]=tmp[8];
+ d[2]=tmp[9];
+ d[3]=tmp[10];
+ d[4]='.';
+ d[5]=mn[0];
+ d[6]=mn[1];
+ d[7]='.';
+ d[8]=tmp[4];
+ d[9]=tmp[5];
+ return d;
+}
+
+
extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion)
{
if ( mirandaVersion < PLUGIN_MAKE_VERSION( 0, 7, 0, 0 ))
return NULL;
+ {
+ static char plugname[52];
+ strcpy(plugname, pluginName" mod [");
+ strcat(plugname, date());
+ strcat(plugname, " ");
+ strcat(plugname, __TIME__);
+ strcat(plugname, "]");
+ pluginInfoEx.shortName = plugname;
+ }
return &pluginInfoEx;
}
@@ -77,7 +132,7 @@ void InitVars()
gbIgnoreContacts = DBGetContactSettingByte(NULL, pluginName, "IgnoreContacts", 0);
gbExclude = DBGetContactSettingByte(NULL, pluginName, "ExcludeContacts", 1);
gbDelExcluded = DBGetContactSettingByte(NULL, pluginName, "DelExcluded", 0);
- gbDelNotInList = DBGetContactSettingByte(NULL, pluginName, "DelNotInList", 0);
+// gbDelNotInList = DBGetContactSettingByte(NULL, pluginName, "DelNotInList", 0);
}
static int OnSystemModulesLoaded(WPARAM wParam,LPARAM lParam)
diff --git a/stopspam_mod/branches/0.0.1.5/options.cpp b/stopspam_mod/branches/0.0.1.6/options.cpp
index 8e78301..9983444 100644
--- a/stopspam_mod/branches/0.0.1.5/options.cpp
+++ b/stopspam_mod/branches/0.0.1.6/options.cpp
@@ -34,7 +34,7 @@ INT_PTR CALLBACK MainDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
SendDlgItemMessage(hwnd, ID_IGNORESPAMMERS, BM_SETCHECK, gbIgnoreContacts ? BST_CHECKED : BST_UNCHECKED, 0);
SendDlgItemMessage(hwnd, ID_EXCLUDE, BM_SETCHECK, gbExclude ? BST_CHECKED : BST_UNCHECKED, 0);
SendDlgItemMessage(hwnd, ID_REMOVE_TMP, BM_SETCHECK, gbDelExcluded ? BST_CHECKED : BST_UNCHECKED, 0);
- SendDlgItemMessage(hwnd, ID_DEL_NO_IN_LIST, BM_SETCHECK, gbDelNotInList ? BST_CHECKED : BST_UNCHECKED, 0);
+// SendDlgItemMessage(hwnd, ID_DEL_NO_IN_LIST, BM_SETCHECK, gbDelNotInList ? BST_CHECKED : BST_UNCHECKED, 0);
}
return TRUE;
case WM_COMMAND:{
@@ -67,8 +67,8 @@ INT_PTR CALLBACK MainDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
BST_CHECKED == SendDlgItemMessage(hwnd, ID_HANDLEAUTHREQ, BM_GETCHECK, 0, 0));
DBWriteContactSettingByte(NULL, pluginName, "DOSIntegration", gbDosServiceIntegration =
BST_CHECKED == SendDlgItemMessage(hwnd, ID_DOS_INTEGRATION, BM_GETCHECK, 0, 0));
- DBWriteContactSettingByte(NULL, pluginName, "DelNotInList", gbDelNotInList =
- BST_CHECKED == SendDlgItemMessage(hwnd, ID_DEL_NO_IN_LIST, BM_GETCHECK, 0, 0));
+/* DBWriteContactSettingByte(NULL, pluginName, "DelNotInList", gbDelNotInList =
+ BST_CHECKED == SendDlgItemMessage(hwnd, ID_DEL_NO_IN_LIST, BM_GETCHECK, 0, 0)); */
{
static tstring NewGroupName, CurrentGroupName;
NewGroupName = GetDlgItemString(hwnd, ID_SPECIALGROUPNAME);
diff --git a/stopspam_mod/branches/0.0.1.5/options.h b/stopspam_mod/branches/0.0.1.6/options.h
index e32791e..e32791e 100644
--- a/stopspam_mod/branches/0.0.1.5/options.h
+++ b/stopspam_mod/branches/0.0.1.6/options.h
diff --git a/stopspam_mod/branches/0.0.1.5/resource.h b/stopspam_mod/branches/0.0.1.6/resource.h
index 4e5950e..4e5950e 100644
--- a/stopspam_mod/branches/0.0.1.5/resource.h
+++ b/stopspam_mod/branches/0.0.1.6/resource.h
diff --git a/stopspam_mod/branches/0.0.1.5/stopspam.cpp b/stopspam_mod/branches/0.0.1.6/stopspam.cpp
index ff50864..e162837 100644
--- a/stopspam_mod/branches/0.0.1.5/stopspam.cpp
+++ b/stopspam_mod/branches/0.0.1.6/stopspam.cpp
@@ -1,13 +1,11 @@
#include "headers.h"
-extern TCHAR const * defQuestion;
-
MIRANDA_HOOK_EVENT(ME_DB_CONTACT_ADDED, w, l)
{
- DBWriteContactSettingByte((HANDLE)w, "CList", "NotOnList", 1);
return 0;
}
+
MIRANDA_HOOK_EVENT(ME_DB_EVENT_ADDED, wParam, lParam)
{
HANDLE hContact = (HANDLE)wParam;
@@ -47,7 +45,7 @@ MIRANDA_HOOK_EVENT(ME_DB_EVENT_ADDED, wParam, lParam)
// if request is from unknown or not marked Answered contact
-
+
int a = DBGetContactSettingByte(hcntct, "CList", "NotOnList", 0);
int b = !DBGetContactSettingByte(hcntct, pluginName, "Answered", 0);
@@ -84,48 +82,53 @@ 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(DBGetContactSettingWord(hContact, dbei->szModule, "ServerId", 0))
+ {
+ DBDeleteContactSetting(hContact, "CList", "NotOnList");
+ return 0;
+ }*/
+
+/* 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))
+*/
+ if(DBGetContactSettingByte(hContact, pluginName, "Answered", 0))
return 0;
- else if(DBGetContactSettingByte(hContact, pluginName, "Excluded", 0))
+ if(DBGetContactSettingByte(hContact, pluginName, "Excluded", 0))
{
if(!DBGetContactSettingByte(hContact, "CList", "NotOnList", 0))
DBDeleteContactSetting(hContact, pluginName, "Excluded");
return 0;
}
// if event is not a message, or if the message has been read or sent...
-/* else if(dbei->flags & DBEF_READ || dbei->eventType != EVENTTYPE_MESSAGE)
+/* if((dbei->flags & DBEF_READ) || (dbei->eventType != EVENTTYPE_MESSAGE) || (dbei->eventType != EVENTTYPE_FILE) || (dbei->eventType != EVENTTYPE_URL) || (dbei->eventType != EVENTTYPE_CONTACTS))
// ...let the event go its way
return 0; */
//we want block not only messages, i seen many types other eventtype flood
- else if(dbei->flags & DBEF_READ)
+ if(dbei->flags & DBEF_READ)
// ...let the event go its way
return 0;
- //mark contact which we trying to contact for exclude from chack
- else if((dbei->flags & DBEF_SENT) && DBGetContactSettingByte(hContact, "CList", "NotOnList", 0)
+ //mark contact which we trying to contact for exclude from check
+ if((dbei->flags & DBEF_SENT) && DBGetContactSettingByte(hContact, "CList", "NotOnList", 0)
&& (!gbMaxQuestCount || DBGetContactSettingDword(hContact, pluginName, "QuestionCount", 0) < gbMaxQuestCount) && gbExclude)
{
DBWriteContactSettingByte(hContact, pluginName, "Excluded", 1);
return 0;
}
// if message is from known or marked Answered contact
- else if(!DBGetContactSettingByte(hContact, "CList", "NotOnList", 0))
+ if(!DBGetContactSettingByte(hContact, "CList", "NotOnList", 0))
// ...let the event go its way
return 0;
// if message is corrupted or empty it cannot be an answer.
- else if(!dbei->cbBlob || !dbei->pBlob)
+ if(!dbei->cbBlob || !dbei->pBlob)
// reject processing of the event
return 1;
@@ -200,16 +203,18 @@ 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)
{
DBWriteContactSettingDword(hContact, "Ignore", "Mask1", 0x0000007F);
- return 1;
}
}
if(gbHideContacts)
diff --git a/stopspam_mod/branches/0.0.1.5/stopspam.h b/stopspam_mod/branches/0.0.1.6/stopspam.h
index 10088bb..10088bb 100644
--- a/stopspam_mod/branches/0.0.1.5/stopspam.h
+++ b/stopspam_mod/branches/0.0.1.6/stopspam.h
diff --git a/stopspam_mod/branches/0.0.1.5/stopspam.rc b/stopspam_mod/branches/0.0.1.6/stopspam.rc
index a8d23ce..b38c2d4 100644
--- a/stopspam_mod/branches/0.0.1.5/stopspam.rc
+++ b/stopspam_mod/branches/0.0.1.6/stopspam.rc
@@ -80,8 +80,6 @@ BEGIN
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,188,270,8
CONTROL "Exclude contacts which we sending something from spam check",ID_EXCLUDE,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,178,270,8
- CONTROL "Automatically delete contacts from ""Not In List"" group",ID_DEL_NO_IN_LIST,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,101,270,8
END
@@ -144,12 +142,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.5 alpha build #0"
+ VALUE "FileVersion", "0.0.1.6 alpha build #0"
VALUE "InternalName", "stopspam"
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.5 alpha build #0"
+ VALUE "ProductVersion", "0.0.1.6 alpha build #0"
END
END
BLOCK "VarFileInfo"
diff --git a/stopspam_mod/branches/0.0.1.5/stopspam_8.sln b/stopspam_mod/branches/0.0.1.6/stopspam_8.sln
index b7014bb..b7014bb 100644
--- a/stopspam_mod/branches/0.0.1.5/stopspam_8.sln
+++ b/stopspam_mod/branches/0.0.1.6/stopspam_8.sln
diff --git a/stopspam_mod/branches/0.0.1.5/stopspam_8.vcproj b/stopspam_mod/branches/0.0.1.6/stopspam_8.vcproj
index 2bc6d66..2bc6d66 100644
--- a/stopspam_mod/branches/0.0.1.5/stopspam_8.vcproj
+++ b/stopspam_mod/branches/0.0.1.6/stopspam_8.vcproj
diff --git a/stopspam_mod/branches/0.0.1.5/stopspam_9.sln b/stopspam_mod/branches/0.0.1.6/stopspam_9.sln
index db623ad..db623ad 100644
--- a/stopspam_mod/branches/0.0.1.5/stopspam_9.sln
+++ b/stopspam_mod/branches/0.0.1.6/stopspam_9.sln
diff --git a/stopspam_mod/branches/0.0.1.5/stopspam_9.vcproj b/stopspam_mod/branches/0.0.1.6/stopspam_9.vcproj
index 5d81d03..5d81d03 100644
--- a/stopspam_mod/branches/0.0.1.5/stopspam_9.vcproj
+++ b/stopspam_mod/branches/0.0.1.6/stopspam_9.vcproj
diff --git a/stopspam_mod/branches/0.0.1.5/utilities.cpp b/stopspam_mod/branches/0.0.1.6/utilities.cpp
index f2b35b3..f2b35b3 100644
--- a/stopspam_mod/branches/0.0.1.5/utilities.cpp
+++ b/stopspam_mod/branches/0.0.1.6/utilities.cpp
diff --git a/stopspam_mod/branches/0.0.1.5/utilities.h b/stopspam_mod/branches/0.0.1.6/utilities.h
index efe8a59..efe8a59 100644
--- a/stopspam_mod/branches/0.0.1.5/utilities.h
+++ b/stopspam_mod/branches/0.0.1.6/utilities.h
diff --git a/stopspam_mod/branches/0.0.1.5/version.h b/stopspam_mod/branches/0.0.1.6/version.h
index 9f7c792..9f7c792 100644
--- a/stopspam_mod/branches/0.0.1.5/version.h
+++ b/stopspam_mod/branches/0.0.1.6/version.h