diff options
-rw-r--r-- | Makefile | 24 | ||||
-rw-r--r-- | eventhooker.cpp | 136 | ||||
-rw-r--r-- | eventhooker.h | 120 | ||||
-rw-r--r-- | globals.h | 40 | ||||
-rw-r--r-- | headers.h | 60 | ||||
-rw-r--r-- | init.cpp | 424 | ||||
-rw-r--r-- | options.cpp | 770 | ||||
-rw-r--r-- | resource.h | 108 | ||||
-rw-r--r-- | stopspam.cpp | 500 | ||||
-rw-r--r-- | stopspam.h | 46 | ||||
-rw-r--r-- | stopspam.rc | 466 | ||||
-rw-r--r-- | stopspam_8.sln | 50 | ||||
-rw-r--r-- | stopspam_8.vcproj | 808 | ||||
-rw-r--r-- | stopspam_9.sln | 56 | ||||
-rw-r--r-- | stopspam_9.vcproj | 1050 | ||||
-rw-r--r-- | utilities.cpp | 330 | ||||
-rw-r--r-- | utilities.h | 16 | ||||
-rw-r--r-- | version.h | 12 |
18 files changed, 2508 insertions, 2508 deletions
@@ -1,12 +1,12 @@ -all:
- i686-pc-mingw32-g++ -c -DBUILD_DLL -D UNICODE -D _UNICODE *.cpp -I../../include -I/usr/i686-pc-mingw32/usr/include -I. -I ../miranda-im/miranda/include -w -mwin32 -mwindows -mdll -march=i686 -msse -O2 -pipe
- i686-pc-mingw32-windres -i stopspam.rc -o resources.o
- i686-pc-mingw32-gcc -shared -o stopspam.dll *.o -Wl,-O1,-s -lstdc++
- upx -9 stopspam.dll
-
-clean:
- rm *.o
-
-clean-all:
- rm *.o *.dll
-
+all: + i686-pc-mingw32-g++ -c -DBUILD_DLL -D UNICODE -D _UNICODE *.cpp -I../../include -I/usr/i686-pc-mingw32/usr/include -I. -I ../miranda-im/miranda/include -w -mwin32 -mwindows -mdll -march=i686 -msse -O2 -pipe + i686-pc-mingw32-windres -i stopspam.rc -o resources.o + i686-pc-mingw32-gcc -shared -o stopspam.dll *.o -Wl,-O1,-s -lstdc++ + upx -9 stopspam.dll + +clean: + rm *.o + +clean-all: + rm *.o *.dll + diff --git a/eventhooker.cpp b/eventhooker.cpp index f29e5b7..0160346 100644 --- a/eventhooker.cpp +++ b/eventhooker.cpp @@ -1,68 +1,68 @@ -/* eventhooker.cpp
-* Copyright (C) Miklashevsky Roman
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-#include <list>
-#include "eventhooker.h"
-
-namespace miranda
-{
- namespace
- {
- std::list<EventHooker*> eventHookerList;
- }
-
- EventHooker::EventHooker(std::string name, MIRANDAHOOK fun) : name_(name), fun_(fun), handle_(0)
- {
- eventHookerList.push_back(this);
- }
-
- EventHooker::~EventHooker()
- {
- eventHookerList.remove(this);
- }
-
- void EventHooker::Hook()
- {
- handle_ = HookEvent(name_.c_str(), fun_);
- }
-
- void EventHooker::Unhook()
- {
- if(handle_)
- {
- UnhookEvent(handle_);
- handle_ = 0;
- }
- }
-
- void EventHooker::HookAll()
- {
- for(std::list<EventHooker*>::iterator it = eventHookerList.begin(); it != eventHookerList.end(); ++it)
- {
- (*it)->Hook();
- }
- }
-
- void EventHooker::UnhookAll()
- {
- for(std::list<EventHooker*>::iterator it = eventHookerList.begin(); it != eventHookerList.end(); ++it)
- {
- (*it)->Unhook();
- }
- }
-}
+/* eventhooker.cpp +* Copyright (C) Miklashevsky Roman +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License +* as published by the Free Software Foundation; either version 2 +* of the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +*/ + +#include <list> +#include "eventhooker.h" + +namespace miranda +{ + namespace + { + std::list<EventHooker*> eventHookerList; + } + + EventHooker::EventHooker(std::string name, MIRANDAHOOK fun) : name_(name), fun_(fun), handle_(0) + { + eventHookerList.push_back(this); + } + + EventHooker::~EventHooker() + { + eventHookerList.remove(this); + } + + void EventHooker::Hook() + { + handle_ = HookEvent(name_.c_str(), fun_); + } + + void EventHooker::Unhook() + { + if(handle_) + { + UnhookEvent(handle_); + handle_ = 0; + } + } + + void EventHooker::HookAll() + { + for(std::list<EventHooker*>::iterator it = eventHookerList.begin(); it != eventHookerList.end(); ++it) + { + (*it)->Hook(); + } + } + + void EventHooker::UnhookAll() + { + for(std::list<EventHooker*>::iterator it = eventHookerList.begin(); it != eventHookerList.end(); ++it) + { + (*it)->Unhook(); + } + } +} diff --git a/eventhooker.h b/eventhooker.h index b1ca2ab..8814613 100644 --- a/eventhooker.h +++ b/eventhooker.h @@ -1,60 +1,60 @@ -/* eventhooker.h - Helper for hooking events in Miranda.
-* Copyright (C) Miklashevsky Roman
-*
-* To hook event just write
-* MIRANDA_HOOK_EVENT('name of the event', wParam, lParam) { 'your code' }
-* Include following in your Load function
-* miranda::EventHooker::HookAll();
-* And following in your Unload function
-* miranda::EventHooker::UnhookAll();
-* That's all
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-#ifndef EVENTHOOKER_H_C8EAA58A_7C4D_45f7_A88E_0E41FE93754D
-#define EVENTHOOKER_H_C8EAA58A_7C4D_45f7_A88E_0E41FE93754D
-
-#pragma warning( once : 4430 )
-
-#include <windows.h>
-#include <string>
-#include <newpluginapi.h>
-
-namespace miranda
-{
-
-#define MIRANDA_HOOK_EVENT(NAME, WPARAMNAME, LPARAMNAME) \
- int NAME##_Handler(WPARAM,LPARAM);\
- miranda::EventHooker NAME##_Hooker(NAME, NAME##_Handler);\
- int NAME##_Handler(WPARAM WPARAMNAME, LPARAM LPARAMNAME)
-
- struct EventHooker
- {
- EventHooker(std::string name, MIRANDAHOOK fun);
- ~EventHooker();
- void Hook();
- void Unhook();
- static void HookAll();
- static void UnhookAll();
- private:
- std::string name_;
- MIRANDAHOOK fun_;
- HANDLE handle_;
- };
-
-}
-
-#endif
+/* eventhooker.h - Helper for hooking events in Miranda. +* Copyright (C) Miklashevsky Roman +* +* To hook event just write +* MIRANDA_HOOK_EVENT('name of the event', wParam, lParam) { 'your code' } +* Include following in your Load function +* miranda::EventHooker::HookAll(); +* And following in your Unload function +* miranda::EventHooker::UnhookAll(); +* That's all +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License +* as published by the Free Software Foundation; either version 2 +* of the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +*/ + +#ifndef EVENTHOOKER_H_C8EAA58A_7C4D_45f7_A88E_0E41FE93754D +#define EVENTHOOKER_H_C8EAA58A_7C4D_45f7_A88E_0E41FE93754D + +#pragma warning( once : 4430 ) + +#include <windows.h> +#include <string> +#include <newpluginapi.h> + +namespace miranda +{ + +#define MIRANDA_HOOK_EVENT(NAME, WPARAMNAME, LPARAMNAME) \ + int NAME##_Handler(WPARAM,LPARAM);\ + miranda::EventHooker NAME##_Hooker(NAME, NAME##_Handler);\ + int NAME##_Handler(WPARAM WPARAMNAME, LPARAM LPARAMNAME) + + struct EventHooker + { + EventHooker(std::string name, MIRANDAHOOK fun); + ~EventHooker(); + void Hook(); + void Unhook(); + static void HookAll(); + static void UnhookAll(); + private: + std::string name_; + MIRANDAHOOK fun_; + HANDLE handle_; + }; + +} + +#endif @@ -1,20 +1,20 @@ -#define pluginName "StopSpam"
-/*
-TCHAR const * defAnswer = _T("nospam");
-TCHAR const * defCongratulation =
-_T("Congratulations! You just passed human/robot test. Now you can write me a message.");
-char const * defProtoList = "ICQ\r\n";
-TCHAR const * infTalkProtPrefix = _T("StopSpam automatic message:\r\n");
-char const * answeredSetting = "Answered";
-char const * questCountSetting = "QuestionCount";
-TCHAR const * defAufrepl = _T("StopSpam: send a message and reply to a anti-spam bot question.");*/
-
-
-#ifdef _UNICODE
-typedef std::wstring tstring;
-#define PREF_TCHAR2 PREF_UTF
-#else
-typedef std::string tstring;
-#define PREF_TCHAR2 0
-#endif //_UNICODE
-
+#define pluginName "StopSpam" +/* +TCHAR const * defAnswer = _T("nospam"); +TCHAR const * defCongratulation = +_T("Congratulations! You just passed human/robot test. Now you can write me a message."); +char const * defProtoList = "ICQ\r\n"; +TCHAR const * infTalkProtPrefix = _T("StopSpam automatic message:\r\n"); +char const * answeredSetting = "Answered"; +char const * questCountSetting = "QuestionCount"; +TCHAR const * defAufrepl = _T("StopSpam: send a message and reply to a anti-spam bot question.");*/ + + +#ifdef _UNICODE +typedef std::wstring tstring; +#define PREF_TCHAR2 PREF_UTF +#else +typedef std::string tstring; +#define PREF_TCHAR2 0 +#endif //_UNICODE + @@ -1,30 +1,30 @@ -#include <windows.h>
-#include <stdio.h>
-#include <commctrl.h>
-#include <malloc.h>
-#include <time.h>
-#include <string>
-#include <sstream>
-//#include <boost/scoped_array.hpp>
-#include <newpluginapi.h>
-#include <m_database.h>
-#include <m_protosvc.h>
-#include <m_options.h>
-#include <m_utils.h>
-#include <m_langpack.h>
-#include <m_clistint.h>
-#include <m_skin.h>
-#include <m_button.h>
-//#define VARIABLES_NOHELPER
-#include <m_variables.h>
-
-
-#include "globals.h"
-#include "stopspam.h"
-#include "options.h"
-#include "eventhooker.h"
-#include "version.h"
-#include "resource.h"
-#include "utilities.h"
-
-#include <m_dos.h>
+#include <windows.h> +#include <stdio.h> +#include <commctrl.h> +#include <malloc.h> +#include <time.h> +#include <string> +#include <sstream> +//#include <boost/scoped_array.hpp> +#include <newpluginapi.h> +#include <m_database.h> +#include <m_protosvc.h> +#include <m_options.h> +#include <m_utils.h> +#include <m_langpack.h> +#include <m_clistint.h> +#include <m_skin.h> +#include <m_button.h> +//#define VARIABLES_NOHELPER +#include <m_variables.h> + + +#include "globals.h" +#include "stopspam.h" +#include "options.h" +#include "eventhooker.h" +#include "version.h" +#include "resource.h" +#include "utilities.h" + +#include <m_dos.h> @@ -1,212 +1,212 @@ -#include "headers.h"
-
-
-
-BOOL gbDosServiceExist = 0;
-BOOL gbVarsServiceExist = 0;
-
-DWORD gbMaxQuestCount = 5;
-BOOL gbInfTalkProtection = 0;
-BOOL gbAddPermanent = 0;
-BOOL gbHandleAuthReq = 1;
-BOOL gbSpecialGroup = 0;
-BOOL gbHideContacts = 1;
-BOOL gbIgnoreContacts = 0;
-BOOL gbExclude = 1;
-BOOL gbDelExcluded = 0;
-BOOL gbDosServiceIntegration = 0;
-BOOL gbCaseInsensitive = 0;
-BOOL gbInvisDisable = 0;
-BOOL gbIgnoreURL = 1;
-//BOOL gbDelNotInList = 0;
-tstring gbSpammersGroup = _T("Spammers");
-tstring gbQuestion;
-tstring gbAnswer;
-tstring gbCongratulation;
-std::wstring gbAuthRepl;
-extern char * pluginDescription;
-extern TCHAR const * defQuestion;
-extern int RemoveTmp(WPARAM,LPARAM);
-
-struct MM_INTERFACE mmi;
-
-UTF8_INTERFACE utfi;
-
-
-
-/////////////////////////////////////////////////////////////////////////////////////////
-// returns plugin's extended information
-
-// {553811EE-DEB6-48b8-8902-A8A00C1FD679}
-#define MIID_STOPSPAM { 0x553811ee, 0xdeb6, 0x48b8, { 0x89, 0x2, 0xa8, 0xa0, 0xc, 0x1f, 0xd6, 0x79 } }
-
-PLUGININFOEX pluginInfoEx = {
- sizeof(PLUGININFOEX),
- 0,
- PLUGIN_MAKE_VERSION(0, 0, 1, 7),
- pluginDescription,
- "Roman Miklashevsky",
- "sss123next@list.ru",
- "© 2004-2009 Roman Miklashevsky, A. Petkevich, Kosh&chka, sss",
- "http://sss.chaoslab.ru:81/tracker/mim_plugs/",
- UNICODE_AWARE,
- 0,
- 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]='.';
- if (tmp[4] == ' ')
- d[8] = '0';
- else
- 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, 1 ))
- 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;
-}
-
-extern tstring DBGetContactSettingStringPAN(HANDLE hContact, char const * szModule, char const * szSetting, tstring errorValue);
-
-void InitVars()
-{
- gbDosServiceIntegration = DBGetContactSettingByte(NULL, pluginName, "DOSIntegration", 0);
- gbSpammersGroup = DBGetContactSettingStringPAN(NULL, pluginName, "SpammersGroup", _T("Spammers"));
- gbAnswer = DBGetContactSettingStringPAN(NULL, pluginName, "answer", _T("nospam"));
- gbCongratulation = DBGetContactSettingStringPAN(NULL, pluginName, "congratulation", _T("Congratulations! You just passed human/robot test. Now you can write me a message."));
- gbInfTalkProtection = DBGetContactSettingByte(NULL, pluginName, "infTalkProtection", 0);
- gbAddPermanent = DBGetContactSettingByte(NULL, pluginName, "addPermanent", 0);
- gbMaxQuestCount = DBGetContactSettingDword(NULL, pluginName, "maxQuestCount", 5);
- gbHandleAuthReq = DBGetContactSettingByte(NULL, pluginName, "handleAuthReq", 1);
- gbQuestion = DBGetContactSettingStringPAN(NULL, pluginName, "question", defQuestion);
- gbAnswer = DBGetContactSettingStringPAN(NULL, pluginName, "answer", _T("nospam"));
- gbCongratulation = DBGetContactSettingStringPAN(NULL, pluginName, "congratulation", _T("Congratulations! You just passed human/robot test. Now you can write me a message."));
- gbAuthRepl = DBGetContactSettingStringPAN(NULL, pluginName, "authrepl", _T("StopSpam: send a message and reply to a anti-spam bot question."));
- gbSpecialGroup = DBGetContactSettingByte(NULL, pluginName, "SpecialGroup", 0);
- gbHideContacts = DBGetContactSettingByte(NULL, pluginName, "HideContacts", 0);
- gbIgnoreContacts = DBGetContactSettingByte(NULL, pluginName, "IgnoreContacts", 0);
- gbExclude = DBGetContactSettingByte(NULL, pluginName, "ExcludeContacts", 1);
- gbDelExcluded = DBGetContactSettingByte(NULL, pluginName, "DelExcluded", 0);
- gbCaseInsensitive = DBGetContactSettingByte(NULL, pluginName, "CaseInsensitive", 0);
- gbInvisDisable = DBGetContactSettingByte(NULL, pluginName, "DisableInInvis", 0);
- gbIgnoreURL = DBGetContactSettingByte(NULL, pluginName, "IgnoreURL", 0);
-// gbDelNotInList = DBGetContactSettingByte(NULL, pluginName, "DelNotInList", 0);
-}
-
-static int OnSystemModulesLoaded(WPARAM wParam,LPARAM lParam)
-{
- if (ServiceExists(MS_DOS_SERVICE))
- gbDosServiceExist = TRUE;
- if (ServiceExists(MS_VARS_FORMATSTRING))
- gbVarsServiceExist = TRUE;
- InitVars();
- if(gbDelExcluded)
- RemoveExcludedUsers();
- return 0;
-}
-
-PLUGINLINK *pluginLink;
-HANDLE hEventFilter = 0, hOptInitialise = 0, hSettingChanged = 0;
-
-
-BOOL WINAPI DllMain(HINSTANCE hinstDLL,DWORD fdwReason,LPVOID lpvReserved)
-{
- /*if(DLL_PROCESS_ATTACH == fdwReason)
- hInst=hinstDLL;
- return TRUE;*/
- hInst = hinstDLL;
- return TRUE;
-}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-// returns plugin's interfaces information
-
-static const MUUID interfaces[] = { MIID_STOPSPAM, MIID_LAST };
-
-extern "C" __declspec(dllexport) const MUUID* MirandaPluginInterfaces(void)
-{
- return interfaces;
-}
-
-
-
-extern "C" int __declspec(dllexport) Load(PLUGINLINK *link)
-{
- pluginLink = link;
- CLISTMENUITEM mi;
- CreateServiceFunction("/RemoveTmp",RemoveTmp);
- mir_getMMI(&mmi);
- mir_getUTFI(&utfi);
- HookEvent(ME_SYSTEM_MODULESLOADED, OnSystemModulesLoaded);
- ZeroMemory(&mi,sizeof(mi));
- mi.cbSize=sizeof(mi);
- mi.position=-0x7FFFFFFF;
- mi.flags=0;
- mi.hIcon=LoadSkinnedIcon(SKINICON_OTHER_MIRANDA);
- mi.pszName="Remove Temporary Contacts";
- mi.pszService="/RemoveTmp";
- CallService(MS_CLIST_ADDMAINMENUITEM,0,(LPARAM)&mi);
-
- miranda::EventHooker::HookAll();
- return 0;
-}
-
-extern "C" int __declspec(dllexport) Unload(void)
-{
- miranda::EventHooker::UnhookAll();
- return 0;
-}
+#include "headers.h" + + + +BOOL gbDosServiceExist = 0; +BOOL gbVarsServiceExist = 0; + +DWORD gbMaxQuestCount = 5; +BOOL gbInfTalkProtection = 0; +BOOL gbAddPermanent = 0; +BOOL gbHandleAuthReq = 1; +BOOL gbSpecialGroup = 0; +BOOL gbHideContacts = 1; +BOOL gbIgnoreContacts = 0; +BOOL gbExclude = 1; +BOOL gbDelExcluded = 0; +BOOL gbDosServiceIntegration = 0; +BOOL gbCaseInsensitive = 0; +BOOL gbInvisDisable = 0; +BOOL gbIgnoreURL = 1; +//BOOL gbDelNotInList = 0; +tstring gbSpammersGroup = _T("Spammers"); +tstring gbQuestion; +tstring gbAnswer; +tstring gbCongratulation; +std::wstring gbAuthRepl; +extern char * pluginDescription; +extern TCHAR const * defQuestion; +extern int RemoveTmp(WPARAM,LPARAM); + +struct MM_INTERFACE mmi; + +UTF8_INTERFACE utfi; + + + +///////////////////////////////////////////////////////////////////////////////////////// +// returns plugin's extended information + +// {553811EE-DEB6-48b8-8902-A8A00C1FD679} +#define MIID_STOPSPAM { 0x553811ee, 0xdeb6, 0x48b8, { 0x89, 0x2, 0xa8, 0xa0, 0xc, 0x1f, 0xd6, 0x79 } } + +PLUGININFOEX pluginInfoEx = { + sizeof(PLUGININFOEX), + 0, + PLUGIN_MAKE_VERSION(0, 0, 1, 7), + pluginDescription, + "Roman Miklashevsky", + "sss123next@list.ru", + "© 2004-2009 Roman Miklashevsky, A. Petkevich, Kosh&chka, sss", + "http://sss.chaoslab.ru:81/tracker/mim_plugs/", + UNICODE_AWARE, + 0, + 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]='.'; + if (tmp[4] == ' ') + d[8] = '0'; + else + 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, 1 )) + 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; +} + +extern tstring DBGetContactSettingStringPAN(HANDLE hContact, char const * szModule, char const * szSetting, tstring errorValue); + +void InitVars() +{ + gbDosServiceIntegration = DBGetContactSettingByte(NULL, pluginName, "DOSIntegration", 0); + gbSpammersGroup = DBGetContactSettingStringPAN(NULL, pluginName, "SpammersGroup", _T("Spammers")); + gbAnswer = DBGetContactSettingStringPAN(NULL, pluginName, "answer", _T("nospam")); + gbCongratulation = DBGetContactSettingStringPAN(NULL, pluginName, "congratulation", _T("Congratulations! You just passed human/robot test. Now you can write me a message.")); + gbInfTalkProtection = DBGetContactSettingByte(NULL, pluginName, "infTalkProtection", 0); + gbAddPermanent = DBGetContactSettingByte(NULL, pluginName, "addPermanent", 0); + gbMaxQuestCount = DBGetContactSettingDword(NULL, pluginName, "maxQuestCount", 5); + gbHandleAuthReq = DBGetContactSettingByte(NULL, pluginName, "handleAuthReq", 1); + gbQuestion = DBGetContactSettingStringPAN(NULL, pluginName, "question", defQuestion); + gbAnswer = DBGetContactSettingStringPAN(NULL, pluginName, "answer", _T("nospam")); + gbCongratulation = DBGetContactSettingStringPAN(NULL, pluginName, "congratulation", _T("Congratulations! You just passed human/robot test. Now you can write me a message.")); + gbAuthRepl = DBGetContactSettingStringPAN(NULL, pluginName, "authrepl", _T("StopSpam: send a message and reply to a anti-spam bot question.")); + gbSpecialGroup = DBGetContactSettingByte(NULL, pluginName, "SpecialGroup", 0); + gbHideContacts = DBGetContactSettingByte(NULL, pluginName, "HideContacts", 0); + gbIgnoreContacts = DBGetContactSettingByte(NULL, pluginName, "IgnoreContacts", 0); + gbExclude = DBGetContactSettingByte(NULL, pluginName, "ExcludeContacts", 1); + gbDelExcluded = DBGetContactSettingByte(NULL, pluginName, "DelExcluded", 0); + gbCaseInsensitive = DBGetContactSettingByte(NULL, pluginName, "CaseInsensitive", 0); + gbInvisDisable = DBGetContactSettingByte(NULL, pluginName, "DisableInInvis", 0); + gbIgnoreURL = DBGetContactSettingByte(NULL, pluginName, "IgnoreURL", 0); +// gbDelNotInList = DBGetContactSettingByte(NULL, pluginName, "DelNotInList", 0); +} + +static int OnSystemModulesLoaded(WPARAM wParam,LPARAM lParam) +{ + if (ServiceExists(MS_DOS_SERVICE)) + gbDosServiceExist = TRUE; + if (ServiceExists(MS_VARS_FORMATSTRING)) + gbVarsServiceExist = TRUE; + InitVars(); + if(gbDelExcluded) + RemoveExcludedUsers(); + return 0; +} + +PLUGINLINK *pluginLink; +HANDLE hEventFilter = 0, hOptInitialise = 0, hSettingChanged = 0; + + +BOOL WINAPI DllMain(HINSTANCE hinstDLL,DWORD fdwReason,LPVOID lpvReserved) +{ + /*if(DLL_PROCESS_ATTACH == fdwReason) + hInst=hinstDLL; + return TRUE;*/ + hInst = hinstDLL; + return TRUE; +} + +///////////////////////////////////////////////////////////////////////////////////////// +// returns plugin's interfaces information + +static const MUUID interfaces[] = { MIID_STOPSPAM, MIID_LAST }; + +extern "C" __declspec(dllexport) const MUUID* MirandaPluginInterfaces(void) +{ + return interfaces; +} + + + +extern "C" int __declspec(dllexport) Load(PLUGINLINK *link) +{ + pluginLink = link; + CLISTMENUITEM mi; + CreateServiceFunction("/RemoveTmp",RemoveTmp); + mir_getMMI(&mmi); + mir_getUTFI(&utfi); + HookEvent(ME_SYSTEM_MODULESLOADED, OnSystemModulesLoaded); + ZeroMemory(&mi,sizeof(mi)); + mi.cbSize=sizeof(mi); + mi.position=-0x7FFFFFFF; + mi.flags=0; + mi.hIcon=LoadSkinnedIcon(SKINICON_OTHER_MIRANDA); + mi.pszName="Remove Temporary Contacts"; + mi.pszService="/RemoveTmp"; + CallService(MS_CLIST_ADDMAINMENUITEM,0,(LPARAM)&mi); + + miranda::EventHooker::HookAll(); + return 0; +} + +extern "C" int __declspec(dllexport) Unload(void) +{ + miranda::EventHooker::UnhookAll(); + return 0; +} diff --git a/options.cpp b/options.cpp index 9ef6bcc..fabee4d 100644 --- a/options.cpp +++ b/options.cpp @@ -1,385 +1,385 @@ -#define MIRANDA_VER 0x0800
-#include "headers.h"
-
-char * pluginDescription = "No more spam! Robots can't go! Only human beings invited!\r\n\r\n"
-"This plugin works pretty simple:\r\n"
-"While messages from users on your contact list go as there is no any anti-spam software, "
-"messages from unknown users are not delivered to you. "
-"But also they are not ignored, this plugin replies with a simple question, "
-"and if user gives the right answer plugin adds him to your contact list "
-"so that he can contact you.";
-TCHAR const * defQuestion =
-_T("Spammers made me to install small anti-spam system you are now speaking with.\r\n")
-_T("Please reply \"nospam\" without quotes and spaces if you want to contact me.");
-
-
-INT_PTR CALLBACK MainDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
-{
-
- switch(msg)
- {
- case WM_INITDIALOG:
- {
- SetDlgItemTextA(hwnd, ID_DESCRIPTION, pluginDescription);
- TranslateDialogDefault(hwnd);
- SetDlgItemInt(hwnd, ID_MAXQUESTCOUNT, gbMaxQuestCount, FALSE);
- SendDlgItemMessage(hwnd, ID_INFTALKPROT, BM_SETCHECK, gbInfTalkProtection ? BST_CHECKED : BST_UNCHECKED, 0);
- SendDlgItemMessage(hwnd, ID_ADDPERMANENT, BM_SETCHECK, gbAddPermanent ? BST_CHECKED : BST_UNCHECKED, 0);
- SendDlgItemMessage(hwnd, ID_HANDLEAUTHREQ, BM_SETCHECK, gbHandleAuthReq ? BST_CHECKED : BST_UNCHECKED, 0);
- SendDlgItemMessage(hwnd, ID_HIDECONTACTS, BM_SETCHECK, gbHideContacts ? BST_CHECKED : BST_UNCHECKED, 0);
- SendDlgItemMessage(hwnd, ID_IGNORESPAMMERS, BM_SETCHECK, gbIgnoreContacts ? BST_CHECKED : BST_UNCHECKED, 0);
- }
- return TRUE;
- case WM_COMMAND:{
- switch (LOWORD(wParam))
- {
- case ID_MAXQUESTCOUNT:
- {
- if (EN_CHANGE != HIWORD(wParam) || (HWND)lParam != GetFocus())
- return FALSE;
- break;
- }
- }
- SendMessage(GetParent(hwnd), PSM_CHANGED, 0, 0);
- }
- break;
- case WM_NOTIFY:
- {
- NMHDR* nmhdr = (NMHDR*)lParam;
- switch (nmhdr->code)
- {
- case PSN_APPLY:
- {
- DBWriteContactSettingDword(NULL, pluginName, "maxQuestCount", gbMaxQuestCount =
- GetDlgItemInt(hwnd, ID_MAXQUESTCOUNT, NULL, FALSE));
- DBWriteContactSettingByte(NULL, pluginName, "infTalkProtection", gbInfTalkProtection =
- BST_CHECKED == SendDlgItemMessage(hwnd, ID_INFTALKPROT, BM_GETCHECK, 0, 0));
- DBWriteContactSettingByte(NULL, pluginName, "addPermanent", gbAddPermanent =
- BST_CHECKED == SendDlgItemMessage(hwnd, ID_ADDPERMANENT, BM_GETCHECK, 0, 0));
- DBWriteContactSettingByte(NULL, pluginName, "handleAuthReq", gbHandleAuthReq =
- BST_CHECKED == SendDlgItemMessage(hwnd, ID_HANDLEAUTHREQ, BM_GETCHECK, 0, 0));
- DBWriteContactSettingByte(NULL, pluginName, "HideContacts", gbHideContacts =
- BST_CHECKED == SendDlgItemMessage(hwnd, ID_HIDECONTACTS, BM_GETCHECK, 0, 0));
- DBWriteContactSettingByte(NULL, pluginName, "IgnoreContacts", gbIgnoreContacts =
- BST_CHECKED == SendDlgItemMessage(hwnd, ID_IGNORESPAMMERS, BM_GETCHECK, 0, 0));
- }
- return TRUE;
- }
- }
- break;
- }
- return FALSE;
-}
-
-INT_PTR CALLBACK MessagesDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
-{
-
- switch(msg)
- {
- case WM_INITDIALOG:
- {
- TranslateDialogDefault(hwnd);
- SetDlgItemText(hwnd, ID_QUESTION, gbQuestion.c_str());
- SetDlgItemText(hwnd, ID_ANSWER, gbAnswer.c_str());
- SetDlgItemText(hwnd, ID_CONGRATULATION, gbCongratulation.c_str());
- SetDlgItemText(hwnd, ID_AUTHREPL, gbAuthRepl.c_str());
- variables_skin_helpbutton(hwnd, IDC_VARS);
- gbVarsServiceExist?EnableWindow(GetDlgItem(hwnd, IDC_VARS),1):EnableWindow(GetDlgItem(hwnd, IDC_VARS),0);
- }
- return TRUE;
- case WM_COMMAND:
- {
- switch(LOWORD(wParam))
- {
- case ID_QUESTION:
- case ID_ANSWER:
- case ID_AUTHREPL:
- case ID_CONGRATULATION:
- {
- if (EN_CHANGE != HIWORD(wParam) || (HWND)lParam != GetFocus())
- return FALSE;
- break;
- }
- case ID_RESTOREDEFAULTS:
- SetDlgItemText(hwnd, ID_QUESTION, TranslateTS(defQuestion));
- SetDlgItemText(hwnd, ID_ANSWER, TranslateTS(_T("nospam")));
- SetDlgItemText(hwnd, ID_AUTHREPL, TranslateTS(_T("StopSpam: send a message and reply to a anti-spam bot question.")));
- SetDlgItemText(hwnd, ID_CONGRATULATION, TranslateTS(_T("Congratulations! You just passed human/robot test. Now you can write me a message.")));
- SendMessage(GetParent(hwnd), PSM_CHANGED, 0, 0);
- return TRUE;
- case IDC_VARS:
- variables_showhelp(hwnd, msg, VHF_FULLDLG|VHF_SETLASTSUBJECT, NULL, NULL);
- return TRUE;
- }
- SendMessage(GetParent(hwnd), PSM_CHANGED, 0, 0);
- }
- break;
- case WM_NOTIFY:
- {
- NMHDR* nmhdr = (NMHDR*)lParam;
- switch (nmhdr->code)
- {
- case PSN_APPLY:
- {
- DBWriteContactSettingTString(NULL, pluginName, "question",
- GetDlgItemString(hwnd, ID_QUESTION).c_str());
- gbQuestion = DBGetContactSettingStringPAN(NULL, pluginName, "question", defQuestion);
- DBWriteContactSettingTString(NULL, pluginName, "answer",
- GetDlgItemString(hwnd, ID_ANSWER).c_str());
- gbAnswer = DBGetContactSettingStringPAN(NULL, pluginName, "answer", _T("nospam"));
- DBWriteContactSettingTString(NULL, pluginName, "authrepl",
- GetDlgItemString(hwnd, ID_AUTHREPL).c_str());
- gbAuthRepl = DBGetContactSettingStringPAN(NULL, pluginName, "authrepl", _T("StopSpam: send a message and reply to a anti-spam bot question."));
- DBWriteContactSettingTString(NULL, pluginName, "congratulation",
- GetDlgItemString(hwnd, ID_CONGRATULATION).c_str());
- gbCongratulation = DBGetContactSettingStringPAN(NULL, pluginName, "congratulation", _T("Congratulations! You just passed human/robot test. Now you can write me a message."));
- }
- return TRUE;
- }
- }
- break;
- }
- return FALSE;
-}
-
-INT_PTR CALLBACK ProtoDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
-{
-
- switch(msg)
- {
- case WM_INITDIALOG:
- {
- TranslateDialogDefault(hwnd);
- int n;
- PROTOCOLDESCRIPTOR** pppd;
- if(!CallService(MS_PROTO_ENUMPROTOCOLS, (LPARAM)&n, (WPARAM)&pppd))
- for(int i = 0; i < n; ++i)
- {
- SendDlgItemMessageA(hwnd, (ProtoInList(pppd[i]->szName) ? ID_USEDPROTO : ID_ALLPROTO),
- LB_ADDSTRING, 0, (LPARAM)pppd[i]->szName);
- }
- }
- return TRUE;
- case WM_COMMAND:
- switch(LOWORD(wParam))
- {
- case ID_ADD:
- {
- WPARAM n = (WPARAM)SendDlgItemMessage(hwnd, ID_ALLPROTO, LB_GETCURSEL, 0, 0);
- if(LB_ERR != n)
- {
- size_t len = SendDlgItemMessage(hwnd, ID_ALLPROTO, LB_GETTEXTLEN, n, 0);
- if(LB_ERR != len)
- {
- TCHAR * buf = new TCHAR[len + 1];
- SendDlgItemMessage(hwnd, ID_ALLPROTO, LB_GETTEXT, n, (LPARAM)buf);
- SendDlgItemMessage(hwnd, ID_USEDPROTO, LB_ADDSTRING, 0, (LPARAM)buf);
- delete []buf;
- SendDlgItemMessage(hwnd, ID_ALLPROTO, LB_DELETESTRING, n, 0);
- }
- }
- }
- break;
- case ID_REMOVE:
- {
- WPARAM n = (WPARAM)SendDlgItemMessage(hwnd, ID_USEDPROTO, LB_GETCURSEL, 0, 0);
- if(LB_ERR != n)
- {
- size_t len = SendDlgItemMessage(hwnd, ID_USEDPROTO, LB_GETTEXTLEN, n, 0);
- if(LB_ERR != len)
- {
- TCHAR * buf = new TCHAR[len + 1];
- SendDlgItemMessage(hwnd, ID_USEDPROTO, LB_GETTEXT, n, (LPARAM)buf);
- SendDlgItemMessage(hwnd, ID_ALLPROTO, LB_ADDSTRING, 0, (LPARAM)buf);
- delete []buf;
- SendDlgItemMessage(hwnd, ID_USEDPROTO, LB_DELETESTRING, n, 0);
- }
- }
- }
- break;
- case ID_ADDALL:
- for(;;)
- {
- LRESULT count = SendDlgItemMessage(hwnd, ID_ALLPROTO, LB_GETCOUNT, 0, 0);
- if(!count || LB_ERR == count)
- break;
- SendDlgItemMessage(hwnd, ID_ALLPROTO, LB_SETCURSEL, 0, 0);
- SendMessage(hwnd, WM_COMMAND, ID_ADD, 0);
- }
- break;
- case ID_REMOVEALL:
- for(;;)
- {
- LRESULT count = SendDlgItemMessage(hwnd, ID_USEDPROTO, LB_GETCOUNT, 0, 0);
- if(!count || LB_ERR == count)
- break;
- SendDlgItemMessage(hwnd, ID_USEDPROTO, LB_SETCURSEL, 0, 0);
- SendMessage(hwnd, WM_COMMAND, ID_REMOVE, 0);
- }
- break;
- default:
- return FALSE;
- }
- SendMessage(GetParent(hwnd), PSM_CHANGED, 0, 0);
- return TRUE;
- case WM_NOTIFY:
- {
- NMHDR* nmhdr = (NMHDR*)lParam;
- switch (nmhdr->code)
- {
- case PSN_APPLY:
- {
- LRESULT count = SendDlgItemMessage(hwnd, ID_USEDPROTO, LB_GETCOUNT, 0, 0);
- std::ostringstream out;
- for(int i = 0; i < count; ++i)
- {
- size_t len = SendDlgItemMessageA(hwnd, ID_USEDPROTO, LB_GETTEXTLEN, i, 0);
- if(LB_ERR != len)
- {
- char * buf = new char[len + 1];
- SendDlgItemMessageA(hwnd, ID_USEDPROTO, LB_GETTEXT, i, (LPARAM)buf);
- out << buf << "\r\n";
- delete []buf;
- }
- }
- DBWriteContactSettingString(NULL, pluginName, "protoList", out.str().c_str());
- }
- return TRUE;
- }
- }
- break;
- }
- return FALSE;
-}
-
-INT_PTR CALLBACK AdvancedDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
-{
-
- switch(msg)
- {
- case WM_INITDIALOG:
- {
- TranslateDialogDefault(hwnd);
- SendDlgItemMessage(hwnd, IDC_INVIS_DISABLE, BM_SETCHECK, gbInvisDisable ? BST_CHECKED : BST_UNCHECKED, 0);
- SendDlgItemMessage(hwnd, IDC_CASE_INSENSITIVE, BM_SETCHECK, gbCaseInsensitive ? BST_CHECKED : BST_UNCHECKED, 0);
- gbDosServiceExist?EnableWindow(GetDlgItem(hwnd, ID_DOS_INTEGRATION),1):EnableWindow(GetDlgItem(hwnd, ID_DOS_INTEGRATION),0);
- SendDlgItemMessage(hwnd, ID_DOS_INTEGRATION, BM_SETCHECK, gbDosServiceIntegration ? BST_CHECKED : BST_UNCHECKED, 0);
- SetDlgItemText(hwnd, ID_SPECIALGROUPNAME, gbSpammersGroup.c_str());
- SendDlgItemMessage(hwnd, ID_SPECIALGROUP, BM_SETCHECK, gbSpecialGroup ? 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_IGNOREURL, BM_SETCHECK, gbIgnoreURL ? BST_CHECKED : BST_UNCHECKED, 0);
- }
- return TRUE;
- case WM_COMMAND:{
- switch (LOWORD(wParam))
- {
- case IDC_INVIS_DISABLE: case IDC_CASE_INSENSITIVE: case ID_DOS_INTEGRATION:
- case ID_SPECIALGROUPNAME: case ID_SPECIALGROUP: case ID_EXCLUDE: case ID_REMOVE_TMP: case ID_IGNOREURL:
- SendMessage(GetParent(hwnd), PSM_CHANGED, 0, 0);
- break;
-
- }
- }
- break;
- case WM_NOTIFY:
- {
- NMHDR* nmhdr = (NMHDR*)lParam;
- switch (nmhdr->code)
- {
- case PSN_APPLY:
- {
- DBWriteContactSettingByte(NULL, pluginName, "CaseInsensitive", gbCaseInsensitive =
- BST_CHECKED == SendDlgItemMessage(hwnd, IDC_CASE_INSENSITIVE, BM_GETCHECK, 0, 0));
- DBWriteContactSettingByte(NULL, pluginName, "DisableInInvis", gbInvisDisable =
- BST_CHECKED == SendDlgItemMessage(hwnd, IDC_INVIS_DISABLE, BM_GETCHECK, 0, 0));
- DBWriteContactSettingByte(NULL, pluginName, "DOSIntegration", gbDosServiceIntegration =
- BST_CHECKED == SendDlgItemMessage(hwnd, ID_DOS_INTEGRATION, BM_GETCHECK, 0, 0));
- {
- static tstring NewGroupName, CurrentGroupName;
- NewGroupName = GetDlgItemString(hwnd, ID_SPECIALGROUPNAME);
- CurrentGroupName = gbSpammersGroup = DBGetContactSettingStringPAN(NULL, pluginName, "SpammersGroup", _T("0"));
- if(wcscmp(CurrentGroupName.c_str(), NewGroupName.c_str()) != 0)
- {
- int GroupNumber = 0;
- BYTE GroupExist = 0;
- TCHAR szValue[96] = {0};
- char szNumber[32] = {0};
- extern int CreateCListGroup(TCHAR* szGroupName);
- strcpy(szNumber, "0");
- while(strcmp(DBGetContactSettingStringPAN_A(NULL, "CListGroups", szNumber, "0").c_str(), "0") != 0)
- {
-#if defined(_MSC_VER) && _MSC_VER >= 1300
- _itoa_s(GroupNumber, szNumber, sizeof(szNumber), 10);
-#else
- _itoa(GroupNumber, szNumber, 10);
-
-#endif
- wcscpy(szValue, DBGetContactSettingStringPAN(NULL, "CListGroups", szNumber, _T("0")).c_str());
- if(wcscmp(NewGroupName.c_str(), szValue + 1) == 0)
- {
- GroupExist = 1;
- break;
- }
- GroupNumber++;
- }
- DBWriteContactSettingTString(NULL,pluginName, "SpammersGroup", NewGroupName.c_str());
- gbSpammersGroup = DBGetContactSettingStringPAN(NULL,pluginName,"SpammersGroup", _T("Spammers"));
- if(!GroupExist && gbSpecialGroup)
- CreateCListGroup((TCHAR*)gbSpammersGroup.c_str());
- }
- }
- DBWriteContactSettingByte(NULL, pluginName, "SpecialGroup", gbSpecialGroup =
- BST_CHECKED == SendDlgItemMessage(hwnd, ID_SPECIALGROUP, BM_GETCHECK, 0, 0));
- DBWriteContactSettingByte(NULL, pluginName, "ExcludeContacts", gbExclude =
- BST_CHECKED == SendDlgItemMessage(hwnd, ID_EXCLUDE, BM_GETCHECK, 0, 0));
- DBWriteContactSettingByte(NULL, pluginName, "DelExcluded", gbDelExcluded =
- BST_CHECKED == SendDlgItemMessage(hwnd, ID_REMOVE_TMP, BM_GETCHECK, 0, 0));
- DBWriteContactSettingByte(NULL, pluginName, "IgnoreURL", gbIgnoreURL =
- BST_CHECKED == SendDlgItemMessage(hwnd, ID_IGNOREURL, BM_GETCHECK, 0, 0));
- }
- return TRUE;
- }
- }
- break;
- }
- return FALSE;
-}
-
-
-HINSTANCE hInst;
-MIRANDA_HOOK_EVENT(ME_OPT_INITIALISE, w, l)
-{
- OPTIONSDIALOGPAGE odp = {0};
- odp.cbSize = sizeof(odp);
- odp.ptszGroup = _T("Message Sessions");
- odp.ptszTitle = _T(pluginName);
- odp.position = -1;
- odp.hInstance = hInst;
- odp.flags = ODPF_TCHAR;
-
- odp.ptszTab = _T("Main");
- odp.pszTemplate = MAKEINTRESOURCEA(IDD_MAIN);
- odp.pfnDlgProc = MainDlgProc;
- CallService(MS_OPT_ADDPAGE, w, (LPARAM)&odp);
-
-
- odp.ptszTab = _T("Messages");
- odp.pszTemplate = MAKEINTRESOURCEA(IDD_MESSAGES);
- odp.pfnDlgProc = MessagesDlgProc;
- CallService(MS_OPT_ADDPAGE, w, (LPARAM)&odp);
-
- odp.ptszTab = _T("Protocols");
- odp.pszTemplate = MAKEINTRESOURCEA(IDD_PROTO);
- odp.pfnDlgProc = ProtoDlgProc;
- CallService(MS_OPT_ADDPAGE, w, (LPARAM)&odp);
-
- odp.ptszTab = _T("Advanced");
- odp.pszTemplate = MAKEINTRESOURCEA(IDD_ADVANCED);
- odp.pfnDlgProc = AdvancedDlgProc;
- odp.flags = odp.flags|ODPF_EXPERTONLY;
- CallService(MS_OPT_ADDPAGE, w, (LPARAM)&odp);
-
- return 0;
-}
-
+#define MIRANDA_VER 0x0800 +#include "headers.h" + +char * pluginDescription = "No more spam! Robots can't go! Only human beings invited!\r\n\r\n" +"This plugin works pretty simple:\r\n" +"While messages from users on your contact list go as there is no any anti-spam software, " +"messages from unknown users are not delivered to you. " +"But also they are not ignored, this plugin replies with a simple question, " +"and if user gives the right answer plugin adds him to your contact list " +"so that he can contact you."; +TCHAR const * defQuestion = +_T("Spammers made me to install small anti-spam system you are now speaking with.\r\n") +_T("Please reply \"nospam\" without quotes and spaces if you want to contact me."); + + +INT_PTR CALLBACK MainDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) +{ + + switch(msg) + { + case WM_INITDIALOG: + { + SetDlgItemTextA(hwnd, ID_DESCRIPTION, pluginDescription); + TranslateDialogDefault(hwnd); + SetDlgItemInt(hwnd, ID_MAXQUESTCOUNT, gbMaxQuestCount, FALSE); + SendDlgItemMessage(hwnd, ID_INFTALKPROT, BM_SETCHECK, gbInfTalkProtection ? BST_CHECKED : BST_UNCHECKED, 0); + SendDlgItemMessage(hwnd, ID_ADDPERMANENT, BM_SETCHECK, gbAddPermanent ? BST_CHECKED : BST_UNCHECKED, 0); + SendDlgItemMessage(hwnd, ID_HANDLEAUTHREQ, BM_SETCHECK, gbHandleAuthReq ? BST_CHECKED : BST_UNCHECKED, 0); + SendDlgItemMessage(hwnd, ID_HIDECONTACTS, BM_SETCHECK, gbHideContacts ? BST_CHECKED : BST_UNCHECKED, 0); + SendDlgItemMessage(hwnd, ID_IGNORESPAMMERS, BM_SETCHECK, gbIgnoreContacts ? BST_CHECKED : BST_UNCHECKED, 0); + } + return TRUE; + case WM_COMMAND:{ + switch (LOWORD(wParam)) + { + case ID_MAXQUESTCOUNT: + { + if (EN_CHANGE != HIWORD(wParam) || (HWND)lParam != GetFocus()) + return FALSE; + break; + } + } + SendMessage(GetParent(hwnd), PSM_CHANGED, 0, 0); + } + break; + case WM_NOTIFY: + { + NMHDR* nmhdr = (NMHDR*)lParam; + switch (nmhdr->code) + { + case PSN_APPLY: + { + DBWriteContactSettingDword(NULL, pluginName, "maxQuestCount", gbMaxQuestCount = + GetDlgItemInt(hwnd, ID_MAXQUESTCOUNT, NULL, FALSE)); + DBWriteContactSettingByte(NULL, pluginName, "infTalkProtection", gbInfTalkProtection = + BST_CHECKED == SendDlgItemMessage(hwnd, ID_INFTALKPROT, BM_GETCHECK, 0, 0)); + DBWriteContactSettingByte(NULL, pluginName, "addPermanent", gbAddPermanent = + BST_CHECKED == SendDlgItemMessage(hwnd, ID_ADDPERMANENT, BM_GETCHECK, 0, 0)); + DBWriteContactSettingByte(NULL, pluginName, "handleAuthReq", gbHandleAuthReq = + BST_CHECKED == SendDlgItemMessage(hwnd, ID_HANDLEAUTHREQ, BM_GETCHECK, 0, 0)); + DBWriteContactSettingByte(NULL, pluginName, "HideContacts", gbHideContacts = + BST_CHECKED == SendDlgItemMessage(hwnd, ID_HIDECONTACTS, BM_GETCHECK, 0, 0)); + DBWriteContactSettingByte(NULL, pluginName, "IgnoreContacts", gbIgnoreContacts = + BST_CHECKED == SendDlgItemMessage(hwnd, ID_IGNORESPAMMERS, BM_GETCHECK, 0, 0)); + } + return TRUE; + } + } + break; + } + return FALSE; +} + +INT_PTR CALLBACK MessagesDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) +{ + + switch(msg) + { + case WM_INITDIALOG: + { + TranslateDialogDefault(hwnd); + SetDlgItemText(hwnd, ID_QUESTION, gbQuestion.c_str()); + SetDlgItemText(hwnd, ID_ANSWER, gbAnswer.c_str()); + SetDlgItemText(hwnd, ID_CONGRATULATION, gbCongratulation.c_str()); + SetDlgItemText(hwnd, ID_AUTHREPL, gbAuthRepl.c_str()); + variables_skin_helpbutton(hwnd, IDC_VARS); + gbVarsServiceExist?EnableWindow(GetDlgItem(hwnd, IDC_VARS),1):EnableWindow(GetDlgItem(hwnd, IDC_VARS),0); + } + return TRUE; + case WM_COMMAND: + { + switch(LOWORD(wParam)) + { + case ID_QUESTION: + case ID_ANSWER: + case ID_AUTHREPL: + case ID_CONGRATULATION: + { + if (EN_CHANGE != HIWORD(wParam) || (HWND)lParam != GetFocus()) + return FALSE; + break; + } + case ID_RESTOREDEFAULTS: + SetDlgItemText(hwnd, ID_QUESTION, TranslateTS(defQuestion)); + SetDlgItemText(hwnd, ID_ANSWER, TranslateTS(_T("nospam"))); + SetDlgItemText(hwnd, ID_AUTHREPL, TranslateTS(_T("StopSpam: send a message and reply to a anti-spam bot question."))); + SetDlgItemText(hwnd, ID_CONGRATULATION, TranslateTS(_T("Congratulations! You just passed human/robot test. Now you can write me a message."))); + SendMessage(GetParent(hwnd), PSM_CHANGED, 0, 0); + return TRUE; + case IDC_VARS: + variables_showhelp(hwnd, msg, VHF_FULLDLG|VHF_SETLASTSUBJECT, NULL, NULL); + return TRUE; + } + SendMessage(GetParent(hwnd), PSM_CHANGED, 0, 0); + } + break; + case WM_NOTIFY: + { + NMHDR* nmhdr = (NMHDR*)lParam; + switch (nmhdr->code) + { + case PSN_APPLY: + { + DBWriteContactSettingTString(NULL, pluginName, "question", + GetDlgItemString(hwnd, ID_QUESTION).c_str()); + gbQuestion = DBGetContactSettingStringPAN(NULL, pluginName, "question", defQuestion); + DBWriteContactSettingTString(NULL, pluginName, "answer", + GetDlgItemString(hwnd, ID_ANSWER).c_str()); + gbAnswer = DBGetContactSettingStringPAN(NULL, pluginName, "answer", _T("nospam")); + DBWriteContactSettingTString(NULL, pluginName, "authrepl", + GetDlgItemString(hwnd, ID_AUTHREPL).c_str()); + gbAuthRepl = DBGetContactSettingStringPAN(NULL, pluginName, "authrepl", _T("StopSpam: send a message and reply to a anti-spam bot question.")); + DBWriteContactSettingTString(NULL, pluginName, "congratulation", + GetDlgItemString(hwnd, ID_CONGRATULATION).c_str()); + gbCongratulation = DBGetContactSettingStringPAN(NULL, pluginName, "congratulation", _T("Congratulations! You just passed human/robot test. Now you can write me a message.")); + } + return TRUE; + } + } + break; + } + return FALSE; +} + +INT_PTR CALLBACK ProtoDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) +{ + + switch(msg) + { + case WM_INITDIALOG: + { + TranslateDialogDefault(hwnd); + int n; + PROTOCOLDESCRIPTOR** pppd; + if(!CallService(MS_PROTO_ENUMPROTOCOLS, (LPARAM)&n, (WPARAM)&pppd)) + for(int i = 0; i < n; ++i) + { + SendDlgItemMessageA(hwnd, (ProtoInList(pppd[i]->szName) ? ID_USEDPROTO : ID_ALLPROTO), + LB_ADDSTRING, 0, (LPARAM)pppd[i]->szName); + } + } + return TRUE; + case WM_COMMAND: + switch(LOWORD(wParam)) + { + case ID_ADD: + { + WPARAM n = (WPARAM)SendDlgItemMessage(hwnd, ID_ALLPROTO, LB_GETCURSEL, 0, 0); + if(LB_ERR != n) + { + size_t len = SendDlgItemMessage(hwnd, ID_ALLPROTO, LB_GETTEXTLEN, n, 0); + if(LB_ERR != len) + { + TCHAR * buf = new TCHAR[len + 1]; + SendDlgItemMessage(hwnd, ID_ALLPROTO, LB_GETTEXT, n, (LPARAM)buf); + SendDlgItemMessage(hwnd, ID_USEDPROTO, LB_ADDSTRING, 0, (LPARAM)buf); + delete []buf; + SendDlgItemMessage(hwnd, ID_ALLPROTO, LB_DELETESTRING, n, 0); + } + } + } + break; + case ID_REMOVE: + { + WPARAM n = (WPARAM)SendDlgItemMessage(hwnd, ID_USEDPROTO, LB_GETCURSEL, 0, 0); + if(LB_ERR != n) + { + size_t len = SendDlgItemMessage(hwnd, ID_USEDPROTO, LB_GETTEXTLEN, n, 0); + if(LB_ERR != len) + { + TCHAR * buf = new TCHAR[len + 1]; + SendDlgItemMessage(hwnd, ID_USEDPROTO, LB_GETTEXT, n, (LPARAM)buf); + SendDlgItemMessage(hwnd, ID_ALLPROTO, LB_ADDSTRING, 0, (LPARAM)buf); + delete []buf; + SendDlgItemMessage(hwnd, ID_USEDPROTO, LB_DELETESTRING, n, 0); + } + } + } + break; + case ID_ADDALL: + for(;;) + { + LRESULT count = SendDlgItemMessage(hwnd, ID_ALLPROTO, LB_GETCOUNT, 0, 0); + if(!count || LB_ERR == count) + break; + SendDlgItemMessage(hwnd, ID_ALLPROTO, LB_SETCURSEL, 0, 0); + SendMessage(hwnd, WM_COMMAND, ID_ADD, 0); + } + break; + case ID_REMOVEALL: + for(;;) + { + LRESULT count = SendDlgItemMessage(hwnd, ID_USEDPROTO, LB_GETCOUNT, 0, 0); + if(!count || LB_ERR == count) + break; + SendDlgItemMessage(hwnd, ID_USEDPROTO, LB_SETCURSEL, 0, 0); + SendMessage(hwnd, WM_COMMAND, ID_REMOVE, 0); + } + break; + default: + return FALSE; + } + SendMessage(GetParent(hwnd), PSM_CHANGED, 0, 0); + return TRUE; + case WM_NOTIFY: + { + NMHDR* nmhdr = (NMHDR*)lParam; + switch (nmhdr->code) + { + case PSN_APPLY: + { + LRESULT count = SendDlgItemMessage(hwnd, ID_USEDPROTO, LB_GETCOUNT, 0, 0); + std::ostringstream out; + for(int i = 0; i < count; ++i) + { + size_t len = SendDlgItemMessageA(hwnd, ID_USEDPROTO, LB_GETTEXTLEN, i, 0); + if(LB_ERR != len) + { + char * buf = new char[len + 1]; + SendDlgItemMessageA(hwnd, ID_USEDPROTO, LB_GETTEXT, i, (LPARAM)buf); + out << buf << "\r\n"; + delete []buf; + } + } + DBWriteContactSettingString(NULL, pluginName, "protoList", out.str().c_str()); + } + return TRUE; + } + } + break; + } + return FALSE; +} + +INT_PTR CALLBACK AdvancedDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) +{ + + switch(msg) + { + case WM_INITDIALOG: + { + TranslateDialogDefault(hwnd); + SendDlgItemMessage(hwnd, IDC_INVIS_DISABLE, BM_SETCHECK, gbInvisDisable ? BST_CHECKED : BST_UNCHECKED, 0); + SendDlgItemMessage(hwnd, IDC_CASE_INSENSITIVE, BM_SETCHECK, gbCaseInsensitive ? BST_CHECKED : BST_UNCHECKED, 0); + gbDosServiceExist?EnableWindow(GetDlgItem(hwnd, ID_DOS_INTEGRATION),1):EnableWindow(GetDlgItem(hwnd, ID_DOS_INTEGRATION),0); + SendDlgItemMessage(hwnd, ID_DOS_INTEGRATION, BM_SETCHECK, gbDosServiceIntegration ? BST_CHECKED : BST_UNCHECKED, 0); + SetDlgItemText(hwnd, ID_SPECIALGROUPNAME, gbSpammersGroup.c_str()); + SendDlgItemMessage(hwnd, ID_SPECIALGROUP, BM_SETCHECK, gbSpecialGroup ? 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_IGNOREURL, BM_SETCHECK, gbIgnoreURL ? BST_CHECKED : BST_UNCHECKED, 0); + } + return TRUE; + case WM_COMMAND:{ + switch (LOWORD(wParam)) + { + case IDC_INVIS_DISABLE: case IDC_CASE_INSENSITIVE: case ID_DOS_INTEGRATION: + case ID_SPECIALGROUPNAME: case ID_SPECIALGROUP: case ID_EXCLUDE: case ID_REMOVE_TMP: case ID_IGNOREURL: + SendMessage(GetParent(hwnd), PSM_CHANGED, 0, 0); + break; + + } + } + break; + case WM_NOTIFY: + { + NMHDR* nmhdr = (NMHDR*)lParam; + switch (nmhdr->code) + { + case PSN_APPLY: + { + DBWriteContactSettingByte(NULL, pluginName, "CaseInsensitive", gbCaseInsensitive = + BST_CHECKED == SendDlgItemMessage(hwnd, IDC_CASE_INSENSITIVE, BM_GETCHECK, 0, 0)); + DBWriteContactSettingByte(NULL, pluginName, "DisableInInvis", gbInvisDisable = + BST_CHECKED == SendDlgItemMessage(hwnd, IDC_INVIS_DISABLE, BM_GETCHECK, 0, 0)); + DBWriteContactSettingByte(NULL, pluginName, "DOSIntegration", gbDosServiceIntegration = + BST_CHECKED == SendDlgItemMessage(hwnd, ID_DOS_INTEGRATION, BM_GETCHECK, 0, 0)); + { + static tstring NewGroupName, CurrentGroupName; + NewGroupName = GetDlgItemString(hwnd, ID_SPECIALGROUPNAME); + CurrentGroupName = gbSpammersGroup = DBGetContactSettingStringPAN(NULL, pluginName, "SpammersGroup", _T("0")); + if(wcscmp(CurrentGroupName.c_str(), NewGroupName.c_str()) != 0) + { + int GroupNumber = 0; + BYTE GroupExist = 0; + TCHAR szValue[96] = {0}; + char szNumber[32] = {0}; + extern int CreateCListGroup(TCHAR* szGroupName); + strcpy(szNumber, "0"); + while(strcmp(DBGetContactSettingStringPAN_A(NULL, "CListGroups", szNumber, "0").c_str(), "0") != 0) + { +#if defined(_MSC_VER) && _MSC_VER >= 1300 + _itoa_s(GroupNumber, szNumber, sizeof(szNumber), 10); +#else + _itoa(GroupNumber, szNumber, 10); + +#endif + wcscpy(szValue, DBGetContactSettingStringPAN(NULL, "CListGroups", szNumber, _T("0")).c_str()); + if(wcscmp(NewGroupName.c_str(), szValue + 1) == 0) + { + GroupExist = 1; + break; + } + GroupNumber++; + } + DBWriteContactSettingTString(NULL,pluginName, "SpammersGroup", NewGroupName.c_str()); + gbSpammersGroup = DBGetContactSettingStringPAN(NULL,pluginName,"SpammersGroup", _T("Spammers")); + if(!GroupExist && gbSpecialGroup) + CreateCListGroup((TCHAR*)gbSpammersGroup.c_str()); + } + } + DBWriteContactSettingByte(NULL, pluginName, "SpecialGroup", gbSpecialGroup = + BST_CHECKED == SendDlgItemMessage(hwnd, ID_SPECIALGROUP, BM_GETCHECK, 0, 0)); + DBWriteContactSettingByte(NULL, pluginName, "ExcludeContacts", gbExclude = + BST_CHECKED == SendDlgItemMessage(hwnd, ID_EXCLUDE, BM_GETCHECK, 0, 0)); + DBWriteContactSettingByte(NULL, pluginName, "DelExcluded", gbDelExcluded = + BST_CHECKED == SendDlgItemMessage(hwnd, ID_REMOVE_TMP, BM_GETCHECK, 0, 0)); + DBWriteContactSettingByte(NULL, pluginName, "IgnoreURL", gbIgnoreURL = + BST_CHECKED == SendDlgItemMessage(hwnd, ID_IGNOREURL, BM_GETCHECK, 0, 0)); + } + return TRUE; + } + } + break; + } + return FALSE; +} + + +HINSTANCE hInst; +MIRANDA_HOOK_EVENT(ME_OPT_INITIALISE, w, l) +{ + OPTIONSDIALOGPAGE odp = {0}; + odp.cbSize = sizeof(odp); + odp.ptszGroup = _T("Message Sessions"); + odp.ptszTitle = _T(pluginName); + odp.position = -1; + odp.hInstance = hInst; + odp.flags = ODPF_TCHAR; + + odp.ptszTab = _T("Main"); + odp.pszTemplate = MAKEINTRESOURCEA(IDD_MAIN); + odp.pfnDlgProc = MainDlgProc; + CallService(MS_OPT_ADDPAGE, w, (LPARAM)&odp); + + + odp.ptszTab = _T("Messages"); + odp.pszTemplate = MAKEINTRESOURCEA(IDD_MESSAGES); + odp.pfnDlgProc = MessagesDlgProc; + CallService(MS_OPT_ADDPAGE, w, (LPARAM)&odp); + + odp.ptszTab = _T("Protocols"); + odp.pszTemplate = MAKEINTRESOURCEA(IDD_PROTO); + odp.pfnDlgProc = ProtoDlgProc; + CallService(MS_OPT_ADDPAGE, w, (LPARAM)&odp); + + odp.ptszTab = _T("Advanced"); + odp.pszTemplate = MAKEINTRESOURCEA(IDD_ADVANCED); + odp.pfnDlgProc = AdvancedDlgProc; + odp.flags = odp.flags|ODPF_EXPERTONLY; + CallService(MS_OPT_ADDPAGE, w, (LPARAM)&odp); + + return 0; +} + @@ -1,54 +1,54 @@ -//{{NO_DEPENDENCIES}}
-// Microsoft Visual C++ generated include file.
-// Used by stopspam.rc
-//
-#define IDD_MESSAGES 101
-#define IDD_MAIN 103
-#define ID_DESCRIPTION 1001
-#define ID_QUESTION 1002
-#define ID_ANSWER 1003
-#define ID_CONGRATULATION 1004
-#define ID_RESTOREDEFAULTS 1005
-#define ID_ADD 1005
-#define ID_ANSWER2 1007
-#define ID_AUTHREPL 1007
-#define ID_ALLPROTO 1008
-#define IDD_PROTO 1008
-#define ID_MAXQUESTCOUNT 1008
-#define ID_REMOVE 1009
-#define ID_SPECIALGROUPNAME 1009
-#define IDD_ADVANCED 1009
-#define ID_USEDPROTO 1010
-#define ID_REMOVEALL 1011
-#define ID_ADDALL 1012
-#define ID_INFTALKPROT 1013
-#define ID_ADDPERMANENT 1014
-#define ID_ADDPERMANENT2 1015
-#define ID_HANDLEAUTHREQ 1015
-#define ID_DOS_INTEGRATION 1016
-#define ID_SPECIALGROUP 1017
-#define IDC_BUTTON1 1017
-#define IDC_VARS 1017
-#define ID_HIDECONTACTS 1018
-#define IDC_CASE_INSENSITIVE 1018
-#define ID_IGNORESPAMMERS 1019
-#define IDC_CHECK2 1019
-#define IDC_INVIS_DISABLE 1019
-#define ID_REMOVE_TMP 1020
-#define IDC_CUSTOM1 1020
-#define ID_REMOVE_TMP2 1021
-#define ID_EXCLUDE 1021
-#define ID_ADDPERMANENT3 1022
-#define ID_DEL_NO_IN_LIST 1022
-#define ID_IGNOREURL 1023
-
-// Next default values for new objects
-//
-#ifdef APSTUDIO_INVOKED
-#ifndef APSTUDIO_READONLY_SYMBOLS
-#define _APS_NEXT_RESOURCE_VALUE 104
-#define _APS_NEXT_COMMAND_VALUE 40001
-#define _APS_NEXT_CONTROL_VALUE 1021
-#define _APS_NEXT_SYMED_VALUE 101
-#endif
-#endif
+//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by stopspam.rc +// +#define IDD_MESSAGES 101 +#define IDD_MAIN 103 +#define ID_DESCRIPTION 1001 +#define ID_QUESTION 1002 +#define ID_ANSWER 1003 +#define ID_CONGRATULATION 1004 +#define ID_RESTOREDEFAULTS 1005 +#define ID_ADD 1005 +#define ID_ANSWER2 1007 +#define ID_AUTHREPL 1007 +#define ID_ALLPROTO 1008 +#define IDD_PROTO 1008 +#define ID_MAXQUESTCOUNT 1008 +#define ID_REMOVE 1009 +#define ID_SPECIALGROUPNAME 1009 +#define IDD_ADVANCED 1009 +#define ID_USEDPROTO 1010 +#define ID_REMOVEALL 1011 +#define ID_ADDALL 1012 +#define ID_INFTALKPROT 1013 +#define ID_ADDPERMANENT 1014 +#define ID_ADDPERMANENT2 1015 +#define ID_HANDLEAUTHREQ 1015 +#define ID_DOS_INTEGRATION 1016 +#define ID_SPECIALGROUP 1017 +#define IDC_BUTTON1 1017 +#define IDC_VARS 1017 +#define ID_HIDECONTACTS 1018 +#define IDC_CASE_INSENSITIVE 1018 +#define ID_IGNORESPAMMERS 1019 +#define IDC_CHECK2 1019 +#define IDC_INVIS_DISABLE 1019 +#define ID_REMOVE_TMP 1020 +#define IDC_CUSTOM1 1020 +#define ID_REMOVE_TMP2 1021 +#define ID_EXCLUDE 1021 +#define ID_ADDPERMANENT3 1022 +#define ID_DEL_NO_IN_LIST 1022 +#define ID_IGNOREURL 1023 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 104 +#define _APS_NEXT_COMMAND_VALUE 40001 +#define _APS_NEXT_CONTROL_VALUE 1021 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/stopspam.cpp b/stopspam.cpp index d071a08..890d559 100644 --- a/stopspam.cpp +++ b/stopspam.cpp @@ -1,250 +1,250 @@ -#include "headers.h"
-
-MIRANDA_HOOK_EVENT(ME_DB_CONTACT_ADDED, w, l)
-{
- return 0;
-}
-
-
-MIRANDA_HOOK_EVENT(ME_DB_EVENT_ADDED, wParam, lParam)
-{
- HANDLE hContact = (HANDLE)wParam;
- HANDLE hDbEvent = (HANDLE)lParam;
-
- DBEVENTINFO dbei = {0};
- dbei.cbSize = sizeof(dbei);
- dbei.cbBlob = CallService(MS_DB_EVENT_GETBLOBSIZE, (WPARAM)hDbEvent, 0);
- if(-1 == dbei.cbBlob)
- return 0;
-
- dbei.pBlob = new BYTE[dbei.cbBlob];
- CallService(MS_DB_EVENT_GET, lParam, (LPARAM)&dbei);
-
- // if event is in protocol that is not despammed
- if(!ProtoInList(dbei.szModule)) {
- delete dbei.pBlob;
- return 0;
- }
-
- // event is an auth request
- if(gbHandleAuthReq)
- {
- if(!(dbei.flags & DBEF_SENT) && !(dbei.flags & DBEF_READ) && dbei.eventType == EVENTTYPE_AUTHREQUEST)
- {
- HANDLE hcntct;
- hcntct=*((PHANDLE)(dbei.pBlob+sizeof(DWORD)));
-
-
- // if request is from unknown or not marked Answered contact
-
- int a = DBGetContactSettingByte(hcntct, "CList", "NotOnList", 0);
- int b = !DBGetContactSettingByte(hcntct, pluginName, "Answered", 0);
-
- if(a && b)//
- {
- // ...send message
-
- if(gbHideContacts)
- DBWriteContactSettingByte(hcntct, "CList", "Hidden", 1);
- if(gbSpecialGroup)
- DBWriteContactSettingTString(hcntct, "CList", "Group", gbSpammersGroup.c_str());
-
- BYTE msg = 1;
- if(gbInvisDisable)
- {
- if(CallProtoService(dbei.szModule, PS_GETSTATUS, 0, 0) == ID_STATUS_INVISIBLE)
- msg = 0;
- else if(DBGetContactSettingWord(hContact,dbei.szModule,"ApparentMode",0) == ID_STATUS_OFFLINE)
- msg = 0; //is it useful ?
- }
- if(msg)
- // int a = CallService(allowService.c_str(), (WPARAM)hDbEvent, (LPARAM)(variables_parse(gbAuthRepl, hcntct).c_str()));
- CallContactService(hcntct, PSS_MESSAGE, PREF_TCHAR, (LPARAM)(variables_parse(gbAuthRepl, hcntct).c_str()));
-
- delete dbei.pBlob;
- return 1;
- }
- }
- }
- delete dbei.pBlob;
- return 0;
-}
-
-MIRANDA_HOOK_EVENT(ME_DB_EVENT_FILTER_ADD, w, l)
-{
- HANDLE hContact = (HANDLE)w;
- DBEVENTINFO * dbei = (DBEVENTINFO*)l;
-
-
- // if event is in protocol that is not despammed
- if(!ProtoInList(dbei->szModule))
- {
- // ...let the event go its way
- return 0;
- }
- //do not check excluded contact
-
- if(DBGetContactSettingByte(hContact, pluginName, "Answered", 0))
- return 0;
- if(DBGetContactSettingByte(hContact, pluginName, "Excluded", 0))
- {
- if(!DBGetContactSettingByte(hContact, "CList", "NotOnList", 0))
- DBDeleteContactSetting(hContact, pluginName, "Excluded");
- return 0;
- }
- //we want block not only messages, i seen many types other eventtype flood
- if(dbei->flags & DBEF_READ)
- // ...let the event go its way
- return 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
- 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.
- if(!dbei->cbBlob || !dbei->pBlob)
- // reject processing of the event
- return 1;
-
- tstring message;
-
- if(dbei->flags & DBEF_UTF){
- WCHAR* msg_u;
- char* msg_a = mir_strdup(( char* )dbei->pBlob );
- mir_utf8decode( msg_a, &msg_u );
-#ifdef _UNICODE
- message = msg_u;
-#else
- message = mir_u2a(msg_u);
-#endif
- }
- else{
-#ifdef _UNICODE
- message = mir_a2u((char*)(dbei->pBlob));
-#else
- message = (char*)(dbei->pBlob);
-#endif
- }
-
- // if message contains right answer...
-
- BYTE msg = 1;
- if(gbInvisDisable)
- {
- if(CallProtoService(dbei->szModule, PS_GETSTATUS, 0, 0) == ID_STATUS_INVISIBLE)
- msg = 0;
- else if(DBGetContactSettingWord(hContact,dbei->szModule,"ApparentMode",0) == ID_STATUS_OFFLINE)
- msg = 0; //is it useful ?
- }
- if(gbCaseInsensitive?(!Stricmp(message.c_str(), (variables_parse(gbAnswer, hContact).c_str()))):( !_tcscmp(message.c_str(), (variables_parse(gbAnswer, hContact).c_str()))))
- {
- // unhide contact
- DBDeleteContactSetting(hContact, "CList", "Hidden");
-
- // mark contact as Answered
- DBWriteContactSettingByte(hContact, pluginName, "Answered", 1);
-
- //add contact permanently
- if(gbAddPermanent) //do not use this )
- DBDeleteContactSetting(hContact, "CList", "NotOnList");
-
- // send congratulation
- if(msg)
- {
-#ifdef _UNICODE
- char * buf=mir_utf8encodeW(variables_parse(gbCongratulation, hContact).c_str());
- CallContactService(hContact, PSS_MESSAGE, PREF_TCHAR, (LPARAM)buf);
- mir_free(buf);
-#else
- CallContactService(hContact, PSS_MESSAGE, 0, (LPARAM)GetCongratulation().c_str());
-#endif
- }
-
- // process the event
- return 0;
- }
-
- if(gbIgnoreURL)
- if((message.find_first_of(_T("http"),0) != std::string::npos) || (message.find_first_of(_T("www"),0) != std::string::npos) || (message.find_first_of(_T(".ru"),0) != std::string::npos) || (message.find_first_of(_T(".com"),0) != std::string::npos) || (message.find_first_of(_T(".de"),0) != std::string::npos) || (message.find_first_of(_T(".cz"),0) != std::string::npos) || (message.find_first_of(_T(".org"),0) != std::string::npos) || (message.find_first_of(_T(".net"),0) != std::string::npos) || (message.find_first_of(_T(".su"),0) != std::string::npos))
- ;
- // if message message does not contain infintite talk protection prefix
- // and question count for this contact is less then maximum
- else if(msg)
- {
- if((!gbInfTalkProtection || tstring::npos==message.find(_T("StopSpam automatic message:\r\n")))
- && (!gbMaxQuestCount || DBGetContactSettingDword(hContact, pluginName, "QuestionCount", 0) < gbMaxQuestCount))
- {
- // send question
- tstring q = _T("StopSpam automatic message:\r\n") + variables_parse(gbQuestion, hContact);
-
-#ifdef _UNICODE
- char * buf=mir_utf8encodeW(q.c_str());
- CallContactService(hContact, PSS_MESSAGE, PREF_UTF, (LPARAM)buf);
- mir_free(buf);
-#else
- CallContactService(hContact, PSS_MESSAGE, 0, (LPARAM)q.c_str());
-#endif
-
- // increment question count
- DWORD questCount = DBGetContactSettingDword(hContact, pluginName, "QuestionCount", 0);
- DBWriteContactSettingDword(hContact, pluginName, "QuestionCount", questCount + 1);
- }
- else
- {
- if (gbDosServiceExist)
- {
- if(gbDosServiceIntegration)
- {
- int i;
- i = rand()%255*13;
- CallService(MS_DOS_SERVICE, (WPARAM)hContact, (LPARAM)i);
- }
- }
- if(gbIgnoreContacts)
- {
- DBWriteContactSettingDword(hContact, "Ignore", "Mask1", 0x0000007F);
- }
- }
- }
- if(gbHideContacts)
- DBWriteContactSettingByte(hContact, "CList", "Hidden", 1);
- if(gbSpecialGroup)
- DBWriteContactSettingTString(hContact, "CList", "Group", gbSpammersGroup.c_str());
- DBWriteContactSettingByte(hContact, "CList", "NotOnList", 1);
-
- // save message from contact
- dbei->flags |= DBEF_READ;
- CallService(MS_DB_EVENT_ADD, (WPARAM)hContact, (LPARAM)dbei);
-
- // reject processing of the event
- return 1;
-}
-
-
-MIRANDA_HOOK_EVENT(ME_DB_CONTACT_SETTINGCHANGED, w, l)
-{
- HANDLE hContact = (HANDLE)w;
- DBCONTACTWRITESETTING * cws = (DBCONTACTWRITESETTING*)l;
-
- // if CList/NotOnList is being deleted then remove answeredSetting
- if(strcmp(cws->szModule, "CList"))
- return 0;
- if(strcmp(cws->szSetting, "NotOnList"))
- return 0;
- if(!cws->value.type)
- {
- DBDeleteContactSetting(hContact, pluginName, "Answered");
- DBDeleteContactSetting(hContact, pluginName, "QuestionCount");
- }
-
- return 0;
-}
-
-
-
+#include "headers.h" + +MIRANDA_HOOK_EVENT(ME_DB_CONTACT_ADDED, w, l) +{ + return 0; +} + + +MIRANDA_HOOK_EVENT(ME_DB_EVENT_ADDED, wParam, lParam) +{ + HANDLE hContact = (HANDLE)wParam; + HANDLE hDbEvent = (HANDLE)lParam; + + DBEVENTINFO dbei = {0}; + dbei.cbSize = sizeof(dbei); + dbei.cbBlob = CallService(MS_DB_EVENT_GETBLOBSIZE, (WPARAM)hDbEvent, 0); + if(-1 == dbei.cbBlob) + return 0; + + dbei.pBlob = new BYTE[dbei.cbBlob]; + CallService(MS_DB_EVENT_GET, lParam, (LPARAM)&dbei); + + // if event is in protocol that is not despammed + if(!ProtoInList(dbei.szModule)) { + delete dbei.pBlob; + return 0; + } + + // event is an auth request + if(gbHandleAuthReq) + { + if(!(dbei.flags & DBEF_SENT) && !(dbei.flags & DBEF_READ) && dbei.eventType == EVENTTYPE_AUTHREQUEST) + { + HANDLE hcntct; + hcntct=*((PHANDLE)(dbei.pBlob+sizeof(DWORD))); + + + // if request is from unknown or not marked Answered contact + + int a = DBGetContactSettingByte(hcntct, "CList", "NotOnList", 0); + int b = !DBGetContactSettingByte(hcntct, pluginName, "Answered", 0); + + if(a && b)// + { + // ...send message + + if(gbHideContacts) + DBWriteContactSettingByte(hcntct, "CList", "Hidden", 1); + if(gbSpecialGroup) + DBWriteContactSettingTString(hcntct, "CList", "Group", gbSpammersGroup.c_str()); + + BYTE msg = 1; + if(gbInvisDisable) + { + if(CallProtoService(dbei.szModule, PS_GETSTATUS, 0, 0) == ID_STATUS_INVISIBLE) + msg = 0; + else if(DBGetContactSettingWord(hContact,dbei.szModule,"ApparentMode",0) == ID_STATUS_OFFLINE) + msg = 0; //is it useful ? + } + if(msg) + // int a = CallService(allowService.c_str(), (WPARAM)hDbEvent, (LPARAM)(variables_parse(gbAuthRepl, hcntct).c_str())); + CallContactService(hcntct, PSS_MESSAGE, PREF_TCHAR, (LPARAM)(variables_parse(gbAuthRepl, hcntct).c_str())); + + delete dbei.pBlob; + return 1; + } + } + } + delete dbei.pBlob; + return 0; +} + +MIRANDA_HOOK_EVENT(ME_DB_EVENT_FILTER_ADD, w, l) +{ + HANDLE hContact = (HANDLE)w; + DBEVENTINFO * dbei = (DBEVENTINFO*)l; + + + // if event is in protocol that is not despammed + if(!ProtoInList(dbei->szModule)) + { + // ...let the event go its way + return 0; + } + //do not check excluded contact + + if(DBGetContactSettingByte(hContact, pluginName, "Answered", 0)) + return 0; + if(DBGetContactSettingByte(hContact, pluginName, "Excluded", 0)) + { + if(!DBGetContactSettingByte(hContact, "CList", "NotOnList", 0)) + DBDeleteContactSetting(hContact, pluginName, "Excluded"); + return 0; + } + //we want block not only messages, i seen many types other eventtype flood + if(dbei->flags & DBEF_READ) + // ...let the event go its way + return 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 + 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. + if(!dbei->cbBlob || !dbei->pBlob) + // reject processing of the event + return 1; + + tstring message; + + if(dbei->flags & DBEF_UTF){ + WCHAR* msg_u; + char* msg_a = mir_strdup(( char* )dbei->pBlob ); + mir_utf8decode( msg_a, &msg_u ); +#ifdef _UNICODE + message = msg_u; +#else + message = mir_u2a(msg_u); +#endif + } + else{ +#ifdef _UNICODE + message = mir_a2u((char*)(dbei->pBlob)); +#else + message = (char*)(dbei->pBlob); +#endif + } + + // if message contains right answer... + + BYTE msg = 1; + if(gbInvisDisable) + { + if(CallProtoService(dbei->szModule, PS_GETSTATUS, 0, 0) == ID_STATUS_INVISIBLE) + msg = 0; + else if(DBGetContactSettingWord(hContact,dbei->szModule,"ApparentMode",0) == ID_STATUS_OFFLINE) + msg = 0; //is it useful ? + } + if(gbCaseInsensitive?(!Stricmp(message.c_str(), (variables_parse(gbAnswer, hContact).c_str()))):( !_tcscmp(message.c_str(), (variables_parse(gbAnswer, hContact).c_str())))) + { + // unhide contact + DBDeleteContactSetting(hContact, "CList", "Hidden"); + + // mark contact as Answered + DBWriteContactSettingByte(hContact, pluginName, "Answered", 1); + + //add contact permanently + if(gbAddPermanent) //do not use this ) + DBDeleteContactSetting(hContact, "CList", "NotOnList"); + + // send congratulation + if(msg) + { +#ifdef _UNICODE + char * buf=mir_utf8encodeW(variables_parse(gbCongratulation, hContact).c_str()); + CallContactService(hContact, PSS_MESSAGE, PREF_TCHAR, (LPARAM)buf); + mir_free(buf); +#else + CallContactService(hContact, PSS_MESSAGE, 0, (LPARAM)GetCongratulation().c_str()); +#endif + } + + // process the event + return 0; + } + + if(gbIgnoreURL) + if((message.find_first_of(_T("http"),0) != std::string::npos) || (message.find_first_of(_T("www"),0) != std::string::npos) || (message.find_first_of(_T(".ru"),0) != std::string::npos) || (message.find_first_of(_T(".com"),0) != std::string::npos) || (message.find_first_of(_T(".de"),0) != std::string::npos) || (message.find_first_of(_T(".cz"),0) != std::string::npos) || (message.find_first_of(_T(".org"),0) != std::string::npos) || (message.find_first_of(_T(".net"),0) != std::string::npos) || (message.find_first_of(_T(".su"),0) != std::string::npos)) + ; + // if message message does not contain infintite talk protection prefix + // and question count for this contact is less then maximum + else if(msg) + { + if((!gbInfTalkProtection || tstring::npos==message.find(_T("StopSpam automatic message:\r\n"))) + && (!gbMaxQuestCount || DBGetContactSettingDword(hContact, pluginName, "QuestionCount", 0) < gbMaxQuestCount)) + { + // send question + tstring q = _T("StopSpam automatic message:\r\n") + variables_parse(gbQuestion, hContact); + +#ifdef _UNICODE + char * buf=mir_utf8encodeW(q.c_str()); + CallContactService(hContact, PSS_MESSAGE, PREF_UTF, (LPARAM)buf); + mir_free(buf); +#else + CallContactService(hContact, PSS_MESSAGE, 0, (LPARAM)q.c_str()); +#endif + + // increment question count + DWORD questCount = DBGetContactSettingDword(hContact, pluginName, "QuestionCount", 0); + DBWriteContactSettingDword(hContact, pluginName, "QuestionCount", questCount + 1); + } + else + { + if (gbDosServiceExist) + { + if(gbDosServiceIntegration) + { + int i; + i = rand()%255*13; + CallService(MS_DOS_SERVICE, (WPARAM)hContact, (LPARAM)i); + } + } + if(gbIgnoreContacts) + { + DBWriteContactSettingDword(hContact, "Ignore", "Mask1", 0x0000007F); + } + } + } + if(gbHideContacts) + DBWriteContactSettingByte(hContact, "CList", "Hidden", 1); + if(gbSpecialGroup) + DBWriteContactSettingTString(hContact, "CList", "Group", gbSpammersGroup.c_str()); + DBWriteContactSettingByte(hContact, "CList", "NotOnList", 1); + + // save message from contact + dbei->flags |= DBEF_READ; + CallService(MS_DB_EVENT_ADD, (WPARAM)hContact, (LPARAM)dbei); + + // reject processing of the event + return 1; +} + + +MIRANDA_HOOK_EVENT(ME_DB_CONTACT_SETTINGCHANGED, w, l) +{ + HANDLE hContact = (HANDLE)w; + DBCONTACTWRITESETTING * cws = (DBCONTACTWRITESETTING*)l; + + // if CList/NotOnList is being deleted then remove answeredSetting + if(strcmp(cws->szModule, "CList")) + return 0; + if(strcmp(cws->szSetting, "NotOnList")) + return 0; + if(!cws->value.type) + { + DBDeleteContactSetting(hContact, pluginName, "Answered"); + DBDeleteContactSetting(hContact, pluginName, "QuestionCount"); + } + + return 0; +} + + + @@ -1,23 +1,23 @@ -
-extern BOOL gbDosServiceExist;
-extern BOOL gbVarsServiceExist;
-extern DWORD gbMaxQuestCount;
-extern BOOL gbInfTalkProtection;
-extern BOOL gbAddPermanent;
-extern BOOL gbHandleAuthReq;
-extern BOOL gbSpecialGroup;
-extern BOOL gbHideContacts;
-extern BOOL gbIgnoreContacts;
-extern BOOL gbExclude;
-extern BOOL gbDelExcluded;
-extern BOOL gbDosServiceIntegration;
-extern BOOL gbDelNotInList;
-extern BOOL gbCaseInsensitive;
-extern BOOL gbInvisDisable;
-extern BOOL gbIgnoreURL;
-extern tstring gbSpammersGroup;
-extern tstring gbQuestion;
-extern tstring gbAnswer;
-extern tstring gbCongratulation;
-extern std::wstring gbAuthRepl;
-
+ +extern BOOL gbDosServiceExist; +extern BOOL gbVarsServiceExist; +extern DWORD gbMaxQuestCount; +extern BOOL gbInfTalkProtection; +extern BOOL gbAddPermanent; +extern BOOL gbHandleAuthReq; +extern BOOL gbSpecialGroup; +extern BOOL gbHideContacts; +extern BOOL gbIgnoreContacts; +extern BOOL gbExclude; +extern BOOL gbDelExcluded; +extern BOOL gbDosServiceIntegration; +extern BOOL gbDelNotInList; +extern BOOL gbCaseInsensitive; +extern BOOL gbInvisDisable; +extern BOOL gbIgnoreURL; +extern tstring gbSpammersGroup; +extern tstring gbQuestion; +extern tstring gbAnswer; +extern tstring gbCongratulation; +extern std::wstring gbAuthRepl; + diff --git a/stopspam.rc b/stopspam.rc index 68bd5ee..b572c38 100644 --- a/stopspam.rc +++ b/stopspam.rc @@ -1,233 +1,233 @@ -// Microsoft Visual C++ generated resource script.
-//
-#include "resource.h"
-
-#define APSTUDIO_READONLY_SYMBOLS
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 2 resource.
-//
-#include "afxres.h"
-
-/////////////////////////////////////////////////////////////////////////////
-#undef APSTUDIO_READONLY_SYMBOLS
-
-/////////////////////////////////////////////////////////////////////////////
-// Russian resources
-
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_RUS)
-#ifdef _WIN32
-LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT
-#pragma code_page(1251)
-#endif //_WIN32
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Dialog
-//
-
-IDD_MESSAGES DIALOGEX 0, 0, 302, 225
-STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_POPUP | WS_SYSMENU
-FONT 8, "MS Shell Dlg", 400, 0, 0x1
-BEGIN
- LTEXT "Question: (Ctrl-Enter for carriage return)",IDC_STATIC,0,5,156,8
- EDITTEXT ID_QUESTION,0,17,300,57,ES_MULTILINE | ES_AUTOVSCROLL | WS_VSCROLL
- PUSHBUTTON "Restore defaults",ID_RESTOREDEFAULTS,234,208,66,14,NOT WS_TABSTOP
- LTEXT "Answer:",IDC_STATIC,0,82,270,8
- EDITTEXT ID_ANSWER,0,94,300,14,ES_AUTOHSCROLL
- LTEXT "Congratulation:",IDC_STATIC,0,112,270,8
- EDITTEXT ID_CONGRATULATION,0,123,300,48,ES_MULTILINE | ES_AUTOVSCROLL | WS_VSCROLL
- LTEXT "Auth. request reply:",IDC_STATIC,0,174,270,8
- EDITTEXT ID_AUTHREPL,0,187,300,14,ES_AUTOHSCROLL
- CONTROL "Vars",IDC_VARS,"MButtonClass",WS_TABSTOP,0,206,16,16
-END
-
-IDD_PROTO DIALOGEX 0, 0, 230, 173
-STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD | WS_SYSMENU
-FONT 8, "MS Shell Dlg", 400, 0, 0x1
-BEGIN
- LTEXT "Avaible accounts:",IDC_STATIC,6,8,84,8
- LISTBOX ID_ALLPROTO,6,20,84,138,LBS_SORT | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
- PUSHBUTTON ">>>>",ID_ADDALL,96,26,36,14
- PUSHBUTTON ">>",ID_ADD,96,44,36,14
- PUSHBUTTON "<<",ID_REMOVE,96,62,36,14
- PUSHBUTTON "<<<<",ID_REMOVEALL,96,80,36,14
- LTEXT "Filtered accounts:",IDC_STATIC,138,8,85,8
- LISTBOX ID_USEDPROTO,138,20,84,138,LBS_SORT | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
-END
-
-IDD_MAIN DIALOGEX 0, 0, 309, 219
-STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD | WS_SYSMENU
-FONT 8, "MS Shell Dlg", 400, 0, 0x1
-BEGIN
- EDITTEXT ID_DESCRIPTION,12,7,290,82,ES_MULTILINE | ES_AUTOVSCROLL | ES_READONLY | NOT WS_TABSTOP
- LTEXT "Do not send more than ",IDC_STATIC,11,89,87,12,SS_CENTERIMAGE
- EDITTEXT ID_MAXQUESTCOUNT,107,89,30,12,ES_AUTOHSCROLL | ES_NUMBER
- LTEXT " questions to one contact (0 - for no limit)",IDC_STATIC,144,89,155,12,SS_CENTERIMAGE
- CONTROL "Enable StopSpam-StopSpam infinite talk protection",ID_INFTALKPROT,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,106,290,10
- CONTROL "Add contact permanently",ID_ADDPERMANENT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,118,290,8
- CONTROL "Enable auth. requests blocking",ID_HANDLEAUTHREQ,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,130,290,8
- CONTROL "Hide unanswered contacts and spammers from contact list",ID_HIDECONTACTS,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,140,290,10
- CONTROL "Ignore spammers (do not write messages to history)",ID_IGNORESPAMMERS,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,151,290,10
-END
-
-IDD_ADVANCED DIALOGEX 0, 0, 309, 219
-STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD | WS_SYSMENU
-FONT 8, "MS Shell Dlg", 400, 0, 0x1
-BEGIN
- CONTROL "Case insensitive answer checking",IDC_CASE_INSENSITIVE,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,54,279,10
- CONTROL "Disable question in invisible mode",IDC_INVIS_DISABLE,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,65,287,10
- CONTROL "Enable integration with DOS plugin",ID_DOS_INTEGRATION,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,77,287,8
- CONTROL "Exclude contacts which we sending something from spam check",ID_EXCLUDE,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,33,287,8
- CONTROL "Remove Excluded contacts after restart",ID_REMOVE_TMP,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,44,287,8
- CONTROL "Add contacts to specified group:",ID_SPECIALGROUP,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,16,196,10
- EDITTEXT ID_SPECIALGROUPNAME,217,15,79,12,ES_AUTOHSCROLL
- CONTROL "Ignore URL in messages",ID_IGNOREURL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,88,287,10
-END
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// DESIGNINFO
-//
-
-#ifdef APSTUDIO_INVOKED
-GUIDELINES DESIGNINFO
-BEGIN
- IDD_MESSAGES, DIALOG
- BEGIN
- RIGHTMARGIN, 300
- TOPMARGIN, 7
- BOTTOMMARGIN, 222
- END
-
- IDD_PROTO, DIALOG
- BEGIN
- LEFTMARGIN, 7
- RIGHTMARGIN, 223
- TOPMARGIN, 7
- BOTTOMMARGIN, 166
- END
-
- IDD_MAIN, DIALOG
- BEGIN
- LEFTMARGIN, 7
- RIGHTMARGIN, 302
- TOPMARGIN, 7
- BOTTOMMARGIN, 212
- END
-
- IDD_ADVANCED, DIALOG
- BEGIN
- LEFTMARGIN, 7
- RIGHTMARGIN, 302
- VERTGUIDE, 15
- TOPMARGIN, 7
- BOTTOMMARGIN, 212
- HORZGUIDE, 11
- END
-END
-#endif // APSTUDIO_INVOKED
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Version
-//
-
-VS_VERSION_INFO VERSIONINFO
- FILEVERSION 0,0,1,7
- PRODUCTVERSION 0,7,0,0
- FILEFLAGSMASK 0x3fL
-#ifdef _DEBUG
- FILEFLAGS 0x1L
-#else
- FILEFLAGS 0x0L
-#endif
- FILEOS 0x40004L
- FILETYPE 0x1L
- FILESUBTYPE 0x0L
-BEGIN
- BLOCK "StringFileInfo"
- BEGIN
- BLOCK "000004b0"
- 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.7"
- 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.7.0.0"
- END
- END
- BLOCK "VarFileInfo"
- BEGIN
- VALUE "Translation", 0x0, 1200
- END
-END
-
-#endif // Russian resources
-/////////////////////////////////////////////////////////////////////////////
-
-
-/////////////////////////////////////////////////////////////////////////////
-// English (U.S.) resources
-
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
-#ifdef _WIN32
-LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
-#pragma code_page(1252)
-#endif //_WIN32
-
-#ifdef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// TEXTINCLUDE
-//
-
-1 TEXTINCLUDE
-BEGIN
- "resource.h\0"
-END
-
-2 TEXTINCLUDE
-BEGIN
- "#include ""afxres.h""\r\n"
- "\0"
-END
-
-3 TEXTINCLUDE
-BEGIN
- "\r\n"
- "\0"
-END
-
-#endif // APSTUDIO_INVOKED
-
-#endif // English (U.S.) resources
-/////////////////////////////////////////////////////////////////////////////
-
-
-
-#ifndef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 3 resource.
-//
-
-
-/////////////////////////////////////////////////////////////////////////////
-#endif // not APSTUDIO_INVOKED
-
+// Microsoft Visual C++ generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "afxres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// Russian resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_RUS) +#ifdef _WIN32 +LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT +#pragma code_page(1251) +#endif //_WIN32 + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_MESSAGES DIALOGEX 0, 0, 302, 225 +STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_POPUP | WS_SYSMENU +FONT 8, "MS Shell Dlg", 400, 0, 0x1 +BEGIN + LTEXT "Question: (Ctrl-Enter for carriage return)",IDC_STATIC,0,5,156,8 + EDITTEXT ID_QUESTION,0,17,300,57,ES_MULTILINE | ES_AUTOVSCROLL | WS_VSCROLL + PUSHBUTTON "Restore defaults",ID_RESTOREDEFAULTS,234,208,66,14,NOT WS_TABSTOP + LTEXT "Answer:",IDC_STATIC,0,82,270,8 + EDITTEXT ID_ANSWER,0,94,300,14,ES_AUTOHSCROLL + LTEXT "Congratulation:",IDC_STATIC,0,112,270,8 + EDITTEXT ID_CONGRATULATION,0,123,300,48,ES_MULTILINE | ES_AUTOVSCROLL | WS_VSCROLL + LTEXT "Auth. request reply:",IDC_STATIC,0,174,270,8 + EDITTEXT ID_AUTHREPL,0,187,300,14,ES_AUTOHSCROLL + CONTROL "Vars",IDC_VARS,"MButtonClass",WS_TABSTOP,0,206,16,16 +END + +IDD_PROTO DIALOGEX 0, 0, 230, 173 +STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD | WS_SYSMENU +FONT 8, "MS Shell Dlg", 400, 0, 0x1 +BEGIN + LTEXT "Avaible accounts:",IDC_STATIC,6,8,84,8 + LISTBOX ID_ALLPROTO,6,20,84,138,LBS_SORT | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP + PUSHBUTTON ">>>>",ID_ADDALL,96,26,36,14 + PUSHBUTTON ">>",ID_ADD,96,44,36,14 + PUSHBUTTON "<<",ID_REMOVE,96,62,36,14 + PUSHBUTTON "<<<<",ID_REMOVEALL,96,80,36,14 + LTEXT "Filtered accounts:",IDC_STATIC,138,8,85,8 + LISTBOX ID_USEDPROTO,138,20,84,138,LBS_SORT | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP +END + +IDD_MAIN DIALOGEX 0, 0, 309, 219 +STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD | WS_SYSMENU +FONT 8, "MS Shell Dlg", 400, 0, 0x1 +BEGIN + EDITTEXT ID_DESCRIPTION,12,7,290,82,ES_MULTILINE | ES_AUTOVSCROLL | ES_READONLY | NOT WS_TABSTOP + LTEXT "Do not send more than ",IDC_STATIC,11,89,87,12,SS_CENTERIMAGE + EDITTEXT ID_MAXQUESTCOUNT,107,89,30,12,ES_AUTOHSCROLL | ES_NUMBER + LTEXT " questions to one contact (0 - for no limit)",IDC_STATIC,144,89,155,12,SS_CENTERIMAGE + CONTROL "Enable StopSpam-StopSpam infinite talk protection",ID_INFTALKPROT, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,106,290,10 + CONTROL "Add contact permanently",ID_ADDPERMANENT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,118,290,8 + CONTROL "Enable auth. requests blocking",ID_HANDLEAUTHREQ,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,130,290,8 + CONTROL "Hide unanswered contacts and spammers from contact list",ID_HIDECONTACTS, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,140,290,10 + CONTROL "Ignore spammers (do not write messages to history)",ID_IGNORESPAMMERS, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,151,290,10 +END + +IDD_ADVANCED DIALOGEX 0, 0, 309, 219 +STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD | WS_SYSMENU +FONT 8, "MS Shell Dlg", 400, 0, 0x1 +BEGIN + CONTROL "Case insensitive answer checking",IDC_CASE_INSENSITIVE, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,54,279,10 + CONTROL "Disable question in invisible mode",IDC_INVIS_DISABLE, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,65,287,10 + CONTROL "Enable integration with DOS plugin",ID_DOS_INTEGRATION, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,77,287,8 + CONTROL "Exclude contacts which we sending something from spam check",ID_EXCLUDE, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,33,287,8 + CONTROL "Remove Excluded contacts after restart",ID_REMOVE_TMP, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,44,287,8 + CONTROL "Add contacts to specified group:",ID_SPECIALGROUP, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,16,196,10 + EDITTEXT ID_SPECIALGROUPNAME,217,15,79,12,ES_AUTOHSCROLL + CONTROL "Ignore URL in messages",ID_IGNOREURL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,88,287,10 +END + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO +BEGIN + IDD_MESSAGES, DIALOG + BEGIN + RIGHTMARGIN, 300 + TOPMARGIN, 7 + BOTTOMMARGIN, 222 + END + + IDD_PROTO, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 223 + TOPMARGIN, 7 + BOTTOMMARGIN, 166 + END + + IDD_MAIN, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 302 + TOPMARGIN, 7 + BOTTOMMARGIN, 212 + END + + IDD_ADVANCED, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 302 + VERTGUIDE, 15 + TOPMARGIN, 7 + BOTTOMMARGIN, 212 + HORZGUIDE, 11 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION 0,0,1,7 + PRODUCTVERSION 0,7,0,0 + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x40004L + FILETYPE 0x1L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "000004b0" + 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.7" + 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.7.0.0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x0, 1200 + END +END + +#endif // Russian resources +///////////////////////////////////////////////////////////////////////////// + + +///////////////////////////////////////////////////////////////////////////// +// English (U.S.) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#pragma code_page(1252) +#endif //_WIN32 + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/stopspam_8.sln b/stopspam_8.sln index b7014bb..371ea20 100644 --- a/stopspam_8.sln +++ b/stopspam_8.sln @@ -1,25 +1,25 @@ -Microsoft Visual Studio Solution File, Format Version 9.00
-# Visual Studio 2005
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "stopspam", "stopspam_8.vcproj", "{3E6CEC79-5E93-4607-B10E-498586ECF6A6}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug Unicode|Win32 = Debug Unicode|Win32
- Debug|Win32 = Debug|Win32
- Release Unicode|Win32 = Release Unicode|Win32
- Release|Win32 = Release|Win32
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {3E6CEC79-5E93-4607-B10E-498586ECF6A6}.Debug Unicode|Win32.ActiveCfg = Debug Unicode|Win32
- {3E6CEC79-5E93-4607-B10E-498586ECF6A6}.Debug Unicode|Win32.Build.0 = Debug Unicode|Win32
- {3E6CEC79-5E93-4607-B10E-498586ECF6A6}.Debug|Win32.ActiveCfg = Debug|Win32
- {3E6CEC79-5E93-4607-B10E-498586ECF6A6}.Debug|Win32.Build.0 = Debug|Win32
- {3E6CEC79-5E93-4607-B10E-498586ECF6A6}.Release Unicode|Win32.ActiveCfg = Release Unicode|Win32
- {3E6CEC79-5E93-4607-B10E-498586ECF6A6}.Release Unicode|Win32.Build.0 = Release Unicode|Win32
- {3E6CEC79-5E93-4607-B10E-498586ECF6A6}.Release|Win32.ActiveCfg = Release|Win32
- {3E6CEC79-5E93-4607-B10E-498586ECF6A6}.Release|Win32.Build.0 = Release|Win32
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
+Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "stopspam", "stopspam_8.vcproj", "{3E6CEC79-5E93-4607-B10E-498586ECF6A6}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug Unicode|Win32 = Debug Unicode|Win32 + Debug|Win32 = Debug|Win32 + Release Unicode|Win32 = Release Unicode|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {3E6CEC79-5E93-4607-B10E-498586ECF6A6}.Debug Unicode|Win32.ActiveCfg = Debug Unicode|Win32 + {3E6CEC79-5E93-4607-B10E-498586ECF6A6}.Debug Unicode|Win32.Build.0 = Debug Unicode|Win32 + {3E6CEC79-5E93-4607-B10E-498586ECF6A6}.Debug|Win32.ActiveCfg = Debug|Win32 + {3E6CEC79-5E93-4607-B10E-498586ECF6A6}.Debug|Win32.Build.0 = Debug|Win32 + {3E6CEC79-5E93-4607-B10E-498586ECF6A6}.Release Unicode|Win32.ActiveCfg = Release Unicode|Win32 + {3E6CEC79-5E93-4607-B10E-498586ECF6A6}.Release Unicode|Win32.Build.0 = Release Unicode|Win32 + {3E6CEC79-5E93-4607-B10E-498586ECF6A6}.Release|Win32.ActiveCfg = Release|Win32 + {3E6CEC79-5E93-4607-B10E-498586ECF6A6}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/stopspam_8.vcproj b/stopspam_8.vcproj index 2bc6d66..cab44cc 100644 --- a/stopspam_8.vcproj +++ b/stopspam_8.vcproj @@ -1,404 +1,404 @@ -<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="8,00"
- Name="stopspam"
- ProjectGUID="{3E6CEC79-5E93-4607-B10E-498586ECF6A6}"
- RootNamespace="stopspam"
- Keyword="Win32Proj"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)/Plugins"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="2"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- CommandLine=""
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""C:\Program Files\boost\boost_1_34_1\""
- PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;STOPSPAM_EXPORTS"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="1"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- OutputFile="$(OutDir)\$(ProjectName).dll"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/stopspam.pdb"
- SubSystem="2"
- ImportLibrary="$(OutDir)/stopspam.lib"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)/Plugins"
- IntermediateDirectory="$(SolutionDir)$(ConfigurationName)/Obj/$(ProjectName)"
- ConfigurationType="2"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- CommandLine=""
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="1"
- InlineFunctionExpansion="1"
- AdditionalIncludeDirectories=""C:\Program Files\boost\boost_1_34_1\""
- PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;STOPSPAM_EXPORTS"
- StringPooling="true"
- RuntimeLibrary="0"
- EnableFunctionLevelLinking="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="0"
- CompileAs="0"
- DisableSpecificWarnings="4996"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- OutputFile="$(OutDir)\$(ProjectName).dll"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- AssemblyDebug="1"
- SubSystem="0"
- OptimizeReferences="0"
- EnableCOMDATFolding="0"
- OptimizeForWindows98="1"
- ImportLibrary=""
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- CommandLine=""
- />
- </Configuration>
- <Configuration
- Name="Release Unicode|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)/Plugins"
- IntermediateDirectory="$(SolutionDir)$(ConfigurationName)/Obj/$(ProjectName)"
- ConfigurationType="2"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="1"
- WholeProgramOptimization="3"
- >
- <Tool
- Name="VCPreBuildEventTool"
- CommandLine=""
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="1"
- InlineFunctionExpansion="1"
- AdditionalIncludeDirectories=""C:\Program Files\boost\boost_1_34_1\""
- PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;STOPSPAM_EXPORTS"
- StringPooling="true"
- RuntimeLibrary="0"
- EnableFunctionLevelLinking="true"
- EnableEnhancedInstructionSet="0"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="0"
- CompileAs="0"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- OutputFile="$(OutDir)\$(ProjectName).dll"
- LinkIncremental="0"
- GenerateDebugInformation="false"
- SubSystem="2"
- OptimizeReferences="2"
- EnableCOMDATFolding="0"
- OptimizeForWindows98="1"
- LinkTimeCodeGeneration="0"
- ImportLibrary=""
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- CommandLine=""
- />
- </Configuration>
- <Configuration
- Name="Debug Unicode|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="2"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- CommandLine=""
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="3"
- FavorSizeOrSpeed="2"
- AdditionalIncludeDirectories=""C:\Program Files\boost\boost_1_34_1\""
- PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;STOPSPAM_EXPORTS"
- MinimalRebuild="true"
- BasicRuntimeChecks="0"
- RuntimeLibrary="1"
- EnableEnhancedInstructionSet="1"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- OutputFile="$(OutDir)\$(ProjectName).dll"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/stopspam.pdb"
- SubSystem="2"
- ImportLibrary="$(OutDir)/stopspam.lib"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
- >
- <File
- RelativePath=".\eventhooker.cpp"
- >
- </File>
- <File
- RelativePath=".\stopspam.cpp"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
- >
- <File
- RelativePath=".\eventhooker.h"
- >
- </File>
- <File
- RelativePath=".\resource.h"
- >
- </File>
- </Filter>
- <Filter
- Name="Resource Files"
- Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
- UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
- >
- <File
- RelativePath=".\stopspam.rc"
- >
- </File>
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
+<?xml version="1.0" encoding="windows-1251"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="8,00" + Name="stopspam" + ProjectGUID="{3E6CEC79-5E93-4607-B10E-498586ECF6A6}" + RootNamespace="stopspam" + Keyword="Win32Proj" + > + <Platforms> + <Platform + Name="Win32" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory="$(SolutionDir)$(ConfigurationName)/Plugins" + IntermediateDirectory="$(ConfigurationName)" + ConfigurationType="2" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + CommandLine="" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories=""C:\Program Files\boost\boost_1_34_1\"" + PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;STOPSPAM_EXPORTS" + MinimalRebuild="true" + BasicRuntimeChecks="3" + RuntimeLibrary="1" + UsePrecompiledHeader="0" + WarningLevel="3" + Detect64BitPortabilityProblems="false" + DebugInformationFormat="3" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + OutputFile="$(OutDir)\$(ProjectName).dll" + LinkIncremental="1" + GenerateDebugInformation="true" + ProgramDatabaseFile="$(OutDir)/stopspam.pdb" + SubSystem="2" + ImportLibrary="$(OutDir)/stopspam.lib" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory="$(SolutionDir)$(ConfigurationName)/Plugins" + IntermediateDirectory="$(SolutionDir)$(ConfigurationName)/Obj/$(ProjectName)" + ConfigurationType="2" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + CommandLine="" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="1" + InlineFunctionExpansion="1" + AdditionalIncludeDirectories=""C:\Program Files\boost\boost_1_34_1\"" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;STOPSPAM_EXPORTS" + StringPooling="true" + RuntimeLibrary="0" + EnableFunctionLevelLinking="true" + UsePrecompiledHeader="0" + WarningLevel="3" + Detect64BitPortabilityProblems="false" + DebugInformationFormat="0" + CompileAs="0" + DisableSpecificWarnings="4996" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + OutputFile="$(OutDir)\$(ProjectName).dll" + LinkIncremental="1" + GenerateDebugInformation="true" + AssemblyDebug="1" + SubSystem="0" + OptimizeReferences="0" + EnableCOMDATFolding="0" + OptimizeForWindows98="1" + ImportLibrary="" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + CommandLine="" + /> + </Configuration> + <Configuration + Name="Release Unicode|Win32" + OutputDirectory="$(SolutionDir)$(ConfigurationName)/Plugins" + IntermediateDirectory="$(SolutionDir)$(ConfigurationName)/Obj/$(ProjectName)" + ConfigurationType="2" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="1" + WholeProgramOptimization="3" + > + <Tool + Name="VCPreBuildEventTool" + CommandLine="" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="1" + InlineFunctionExpansion="1" + AdditionalIncludeDirectories=""C:\Program Files\boost\boost_1_34_1\"" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;STOPSPAM_EXPORTS" + StringPooling="true" + RuntimeLibrary="0" + EnableFunctionLevelLinking="true" + EnableEnhancedInstructionSet="0" + UsePrecompiledHeader="0" + WarningLevel="3" + Detect64BitPortabilityProblems="false" + DebugInformationFormat="0" + CompileAs="0" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + OutputFile="$(OutDir)\$(ProjectName).dll" + LinkIncremental="0" + GenerateDebugInformation="false" + SubSystem="2" + OptimizeReferences="2" + EnableCOMDATFolding="0" + OptimizeForWindows98="1" + LinkTimeCodeGeneration="0" + ImportLibrary="" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + CommandLine="" + /> + </Configuration> + <Configuration + Name="Debug Unicode|Win32" + OutputDirectory="$(SolutionDir)$(ConfigurationName)" + IntermediateDirectory="$(ConfigurationName)" + ConfigurationType="2" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="1" + > + <Tool + Name="VCPreBuildEventTool" + CommandLine="" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="3" + FavorSizeOrSpeed="2" + AdditionalIncludeDirectories=""C:\Program Files\boost\boost_1_34_1\"" + PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;STOPSPAM_EXPORTS" + MinimalRebuild="true" + BasicRuntimeChecks="0" + RuntimeLibrary="1" + EnableEnhancedInstructionSet="1" + UsePrecompiledHeader="0" + WarningLevel="3" + Detect64BitPortabilityProblems="false" + DebugInformationFormat="3" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + OutputFile="$(OutDir)\$(ProjectName).dll" + LinkIncremental="1" + GenerateDebugInformation="true" + ProgramDatabaseFile="$(OutDir)/stopspam.pdb" + SubSystem="2" + ImportLibrary="$(OutDir)/stopspam.lib" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <Filter + Name="Source Files" + Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx" + UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" + > + <File + RelativePath=".\eventhooker.cpp" + > + </File> + <File + RelativePath=".\stopspam.cpp" + > + </File> + </Filter> + <Filter + Name="Header Files" + Filter="h;hpp;hxx;hm;inl;inc;xsd" + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" + > + <File + RelativePath=".\eventhooker.h" + > + </File> + <File + RelativePath=".\resource.h" + > + </File> + </Filter> + <Filter + Name="Resource Files" + Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx" + UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" + > + <File + RelativePath=".\stopspam.rc" + > + </File> + </Filter> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/stopspam_9.sln b/stopspam_9.sln index db623ad..04de726 100644 --- a/stopspam_9.sln +++ b/stopspam_9.sln @@ -1,28 +1,28 @@ -Microsoft Visual Studio Solution File, Format Version 10.00
-# Visual Studio 2008
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "stopspam", "stopspam_9.vcproj", "{3E6CEC79-5E93-4607-B10E-498586ECF6A6}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug Unicode|Win32 = Debug Unicode|Win32
- Debug|Win32 = Debug|Win32
- Release Unicode (static)|Win32 = Release Unicode (static)|Win32
- Release Unicode|Win32 = Release Unicode|Win32
- Release|Win32 = Release|Win32
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {3E6CEC79-5E93-4607-B10E-498586ECF6A6}.Debug Unicode|Win32.ActiveCfg = Debug Unicode|Win32
- {3E6CEC79-5E93-4607-B10E-498586ECF6A6}.Debug Unicode|Win32.Build.0 = Debug Unicode|Win32
- {3E6CEC79-5E93-4607-B10E-498586ECF6A6}.Debug|Win32.ActiveCfg = Debug|Win32
- {3E6CEC79-5E93-4607-B10E-498586ECF6A6}.Debug|Win32.Build.0 = Debug|Win32
- {3E6CEC79-5E93-4607-B10E-498586ECF6A6}.Release Unicode (static)|Win32.ActiveCfg = Release Unicode (static)|Win32
- {3E6CEC79-5E93-4607-B10E-498586ECF6A6}.Release Unicode (static)|Win32.Build.0 = Release Unicode (static)|Win32
- {3E6CEC79-5E93-4607-B10E-498586ECF6A6}.Release Unicode|Win32.ActiveCfg = Release Unicode|Win32
- {3E6CEC79-5E93-4607-B10E-498586ECF6A6}.Release Unicode|Win32.Build.0 = Release Unicode|Win32
- {3E6CEC79-5E93-4607-B10E-498586ECF6A6}.Release|Win32.ActiveCfg = Release|Win32
- {3E6CEC79-5E93-4607-B10E-498586ECF6A6}.Release|Win32.Build.0 = Release|Win32
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
+Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "stopspam", "stopspam_9.vcproj", "{3E6CEC79-5E93-4607-B10E-498586ECF6A6}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug Unicode|Win32 = Debug Unicode|Win32 + Debug|Win32 = Debug|Win32 + Release Unicode (static)|Win32 = Release Unicode (static)|Win32 + Release Unicode|Win32 = Release Unicode|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {3E6CEC79-5E93-4607-B10E-498586ECF6A6}.Debug Unicode|Win32.ActiveCfg = Debug Unicode|Win32 + {3E6CEC79-5E93-4607-B10E-498586ECF6A6}.Debug Unicode|Win32.Build.0 = Debug Unicode|Win32 + {3E6CEC79-5E93-4607-B10E-498586ECF6A6}.Debug|Win32.ActiveCfg = Debug|Win32 + {3E6CEC79-5E93-4607-B10E-498586ECF6A6}.Debug|Win32.Build.0 = Debug|Win32 + {3E6CEC79-5E93-4607-B10E-498586ECF6A6}.Release Unicode (static)|Win32.ActiveCfg = Release Unicode (static)|Win32 + {3E6CEC79-5E93-4607-B10E-498586ECF6A6}.Release Unicode (static)|Win32.Build.0 = Release Unicode (static)|Win32 + {3E6CEC79-5E93-4607-B10E-498586ECF6A6}.Release Unicode|Win32.ActiveCfg = Release Unicode|Win32 + {3E6CEC79-5E93-4607-B10E-498586ECF6A6}.Release Unicode|Win32.Build.0 = Release Unicode|Win32 + {3E6CEC79-5E93-4607-B10E-498586ECF6A6}.Release|Win32.ActiveCfg = Release|Win32 + {3E6CEC79-5E93-4607-B10E-498586ECF6A6}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/stopspam_9.vcproj b/stopspam_9.vcproj index 219a8f3..f4492d0 100644 --- a/stopspam_9.vcproj +++ b/stopspam_9.vcproj @@ -1,525 +1,525 @@ -<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9,00"
- Name="stopspam"
- ProjectGUID="{3E6CEC79-5E93-4607-B10E-498586ECF6A6}"
- RootNamespace="stopspam"
- Keyword="Win32Proj"
- TargetFrameworkVersion="131072"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)/Plugins"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="2"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- CommandLine=""
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""C:\Program Files\boost\boost_1_34_1\""
- PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;STOPSPAM_EXPORTS"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="1"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- OutputFile="$(OutDir)\$(ProjectName).dll"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/stopspam.pdb"
- SubSystem="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- ImportLibrary="$(OutDir)/stopspam.lib"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)/Plugins"
- IntermediateDirectory="$(SolutionDir)$(ConfigurationName)/Obj/$(ProjectName)"
- ConfigurationType="2"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- CommandLine=""
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="1"
- InlineFunctionExpansion="1"
- AdditionalIncludeDirectories=""C:\Program Files\boost\boost_1_34_1\""
- PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;STOPSPAM_EXPORTS"
- StringPooling="true"
- RuntimeLibrary="0"
- EnableFunctionLevelLinking="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="0"
- CompileAs="0"
- DisableSpecificWarnings="4996"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- OutputFile="$(OutDir)\$(ProjectName).dll"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- AssemblyDebug="1"
- SubSystem="0"
- OptimizeReferences="0"
- EnableCOMDATFolding="0"
- OptimizeForWindows98="1"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- ImportLibrary=""
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- CommandLine=""
- />
- </Configuration>
- <Configuration
- Name="Release Unicode|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)/Plugins"
- IntermediateDirectory="$(SolutionDir)$(ConfigurationName)/Obj/$(ProjectName)"
- ConfigurationType="2"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="1"
- WholeProgramOptimization="3"
- >
- <Tool
- Name="VCPreBuildEventTool"
- CommandLine=""
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="3"
- InlineFunctionExpansion="1"
- FavorSizeOrSpeed="2"
- OmitFramePointers="true"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;STOPSPAM_EXPORTS;_CRT_SECURE_NO_DEPRECATE"
- StringPooling="true"
- RuntimeLibrary="2"
- EnableFunctionLevelLinking="true"
- EnableEnhancedInstructionSet="1"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="0"
- CompileAs="0"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- OutputFile="$(OutDir)\$(ProjectName).dll"
- LinkIncremental="0"
- GenerateDebugInformation="true"
- SubSystem="2"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- OptimizeForWindows98="0"
- LinkTimeCodeGeneration="1"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- ImportLibrary=""
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- CommandLine=""
- />
- </Configuration>
- <Configuration
- Name="Debug Unicode|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="2"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- CommandLine=""
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="3"
- FavorSizeOrSpeed="2"
- AdditionalIncludeDirectories="..\..\include"
- PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;STOPSPAM_EXPORTS;_CRT_SECURE_NO_DEPRECATE"
- MinimalRebuild="true"
- BasicRuntimeChecks="0"
- RuntimeLibrary="1"
- EnableEnhancedInstructionSet="1"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- OutputFile="$(OutDir)\$(ProjectName).dll"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/stopspam.pdb"
- SubSystem="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- ImportLibrary="$(OutDir)/stopspam.lib"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release Unicode (static)|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="2"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="1"
- WholeProgramOptimization="3"
- >
- <Tool
- Name="VCPreBuildEventTool"
- CommandLine=""
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="3"
- InlineFunctionExpansion="1"
- FavorSizeOrSpeed="2"
- OmitFramePointers="true"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;STOPSPAM_EXPORTS;_CRT_SECURE_NO_DEPRECATE"
- StringPooling="true"
- RuntimeLibrary="0"
- EnableFunctionLevelLinking="true"
- EnableEnhancedInstructionSet="1"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="0"
- CompileAs="0"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- OutputFile="$(OutDir)\$(ProjectName).dll"
- LinkIncremental="0"
- GenerateDebugInformation="true"
- SubSystem="2"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- OptimizeForWindows98="0"
- LinkTimeCodeGeneration="1"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- ImportLibrary=""
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- CommandLine=""
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
- >
- <File
- RelativePath=".\eventhooker.cpp"
- >
- </File>
- <File
- RelativePath=".\init.cpp"
- >
- </File>
- <File
- RelativePath=".\options.cpp"
- >
- </File>
- <File
- RelativePath=".\stopspam.cpp"
- >
- </File>
- <File
- RelativePath=".\utilities.cpp"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
- >
- <File
- RelativePath=".\eventhooker.h"
- >
- </File>
- <File
- RelativePath=".\globals.h"
- >
- </File>
- <File
- RelativePath=".\headers.h"
- >
- </File>
- <File
- RelativePath=".\options.h"
- >
- </File>
- <File
- RelativePath=".\resource.h"
- >
- </File>
- <File
- RelativePath=".\stopspam.h"
- >
- </File>
- <File
- RelativePath=".\utilities.h"
- >
- </File>
- </Filter>
- <Filter
- Name="Resource Files"
- Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
- UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
- >
- <File
- RelativePath=".\stopspam.rc"
- >
- </File>
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
+<?xml version="1.0" encoding="windows-1251"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="9,00" + Name="stopspam" + ProjectGUID="{3E6CEC79-5E93-4607-B10E-498586ECF6A6}" + RootNamespace="stopspam" + Keyword="Win32Proj" + TargetFrameworkVersion="131072" + > + <Platforms> + <Platform + Name="Win32" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory="$(SolutionDir)$(ConfigurationName)/Plugins" + IntermediateDirectory="$(ConfigurationName)" + ConfigurationType="2" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + CommandLine="" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories=""C:\Program Files\boost\boost_1_34_1\"" + PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;STOPSPAM_EXPORTS" + MinimalRebuild="true" + BasicRuntimeChecks="3" + RuntimeLibrary="1" + UsePrecompiledHeader="0" + WarningLevel="3" + Detect64BitPortabilityProblems="false" + DebugInformationFormat="3" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + OutputFile="$(OutDir)\$(ProjectName).dll" + LinkIncremental="1" + GenerateDebugInformation="true" + ProgramDatabaseFile="$(OutDir)/stopspam.pdb" + SubSystem="2" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" + ImportLibrary="$(OutDir)/stopspam.lib" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory="$(SolutionDir)$(ConfigurationName)/Plugins" + IntermediateDirectory="$(SolutionDir)$(ConfigurationName)/Obj/$(ProjectName)" + ConfigurationType="2" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + CommandLine="" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="1" + InlineFunctionExpansion="1" + AdditionalIncludeDirectories=""C:\Program Files\boost\boost_1_34_1\"" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;STOPSPAM_EXPORTS" + StringPooling="true" + RuntimeLibrary="0" + EnableFunctionLevelLinking="true" + UsePrecompiledHeader="0" + WarningLevel="3" + Detect64BitPortabilityProblems="false" + DebugInformationFormat="0" + CompileAs="0" + DisableSpecificWarnings="4996" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + OutputFile="$(OutDir)\$(ProjectName).dll" + LinkIncremental="1" + GenerateDebugInformation="true" + AssemblyDebug="1" + SubSystem="0" + OptimizeReferences="0" + EnableCOMDATFolding="0" + OptimizeForWindows98="1" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" + ImportLibrary="" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCPostBuildEventTool" + CommandLine="" + /> + </Configuration> + <Configuration + Name="Release Unicode|Win32" + OutputDirectory="$(SolutionDir)$(ConfigurationName)/Plugins" + IntermediateDirectory="$(SolutionDir)$(ConfigurationName)/Obj/$(ProjectName)" + ConfigurationType="2" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="1" + WholeProgramOptimization="3" + > + <Tool + Name="VCPreBuildEventTool" + CommandLine="" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="3" + InlineFunctionExpansion="1" + FavorSizeOrSpeed="2" + OmitFramePointers="true" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;STOPSPAM_EXPORTS;_CRT_SECURE_NO_DEPRECATE" + StringPooling="true" + RuntimeLibrary="2" + EnableFunctionLevelLinking="true" + EnableEnhancedInstructionSet="1" + UsePrecompiledHeader="0" + WarningLevel="3" + Detect64BitPortabilityProblems="false" + DebugInformationFormat="0" + CompileAs="0" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + OutputFile="$(OutDir)\$(ProjectName).dll" + LinkIncremental="0" + GenerateDebugInformation="true" + SubSystem="2" + OptimizeReferences="2" + EnableCOMDATFolding="2" + OptimizeForWindows98="0" + LinkTimeCodeGeneration="1" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" + ImportLibrary="" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCPostBuildEventTool" + CommandLine="" + /> + </Configuration> + <Configuration + Name="Debug Unicode|Win32" + OutputDirectory="$(SolutionDir)$(ConfigurationName)" + IntermediateDirectory="$(ConfigurationName)" + ConfigurationType="2" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="1" + > + <Tool + Name="VCPreBuildEventTool" + CommandLine="" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="3" + FavorSizeOrSpeed="2" + AdditionalIncludeDirectories="..\..\include" + PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;STOPSPAM_EXPORTS;_CRT_SECURE_NO_DEPRECATE" + MinimalRebuild="true" + BasicRuntimeChecks="0" + RuntimeLibrary="1" + EnableEnhancedInstructionSet="1" + UsePrecompiledHeader="0" + WarningLevel="3" + Detect64BitPortabilityProblems="false" + DebugInformationFormat="3" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + OutputFile="$(OutDir)\$(ProjectName).dll" + LinkIncremental="1" + GenerateDebugInformation="true" + ProgramDatabaseFile="$(OutDir)/stopspam.pdb" + SubSystem="2" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" + ImportLibrary="$(OutDir)/stopspam.lib" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Release Unicode (static)|Win32" + OutputDirectory="$(SolutionDir)$(ConfigurationName)" + IntermediateDirectory="$(ConfigurationName)" + ConfigurationType="2" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="1" + WholeProgramOptimization="3" + > + <Tool + Name="VCPreBuildEventTool" + CommandLine="" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="3" + InlineFunctionExpansion="1" + FavorSizeOrSpeed="2" + OmitFramePointers="true" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;STOPSPAM_EXPORTS;_CRT_SECURE_NO_DEPRECATE" + StringPooling="true" + RuntimeLibrary="0" + EnableFunctionLevelLinking="true" + EnableEnhancedInstructionSet="1" + UsePrecompiledHeader="0" + WarningLevel="3" + Detect64BitPortabilityProblems="false" + DebugInformationFormat="0" + CompileAs="0" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + OutputFile="$(OutDir)\$(ProjectName).dll" + LinkIncremental="0" + GenerateDebugInformation="true" + SubSystem="2" + OptimizeReferences="2" + EnableCOMDATFolding="2" + OptimizeForWindows98="0" + LinkTimeCodeGeneration="1" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" + ImportLibrary="" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCPostBuildEventTool" + CommandLine="" + /> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <Filter + Name="Source Files" + Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx" + UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" + > + <File + RelativePath=".\eventhooker.cpp" + > + </File> + <File + RelativePath=".\init.cpp" + > + </File> + <File + RelativePath=".\options.cpp" + > + </File> + <File + RelativePath=".\stopspam.cpp" + > + </File> + <File + RelativePath=".\utilities.cpp" + > + </File> + </Filter> + <Filter + Name="Header Files" + Filter="h;hpp;hxx;hm;inl;inc;xsd" + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" + > + <File + RelativePath=".\eventhooker.h" + > + </File> + <File + RelativePath=".\globals.h" + > + </File> + <File + RelativePath=".\headers.h" + > + </File> + <File + RelativePath=".\options.h" + > + </File> + <File + RelativePath=".\resource.h" + > + </File> + <File + RelativePath=".\stopspam.h" + > + </File> + <File + RelativePath=".\utilities.h" + > + </File> + </Filter> + <Filter + Name="Resource Files" + Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx" + UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" + > + <File + RelativePath=".\stopspam.rc" + > + </File> + </Filter> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/utilities.cpp b/utilities.cpp index 4910b00..d935cae 100644 --- a/utilities.cpp +++ b/utilities.cpp @@ -1,165 +1,165 @@ -#include "headers.h"
-
-tstring DBGetContactSettingStringPAN(HANDLE hContact, char const * szModule, char const * szSetting, tstring errorValue)
-{
- DBVARIANT dbv;
- //if(DBGetContactSetting(hContact, szModule, szSetting, &dbv))
- if(DBGetContactSettingTString(hContact, szModule, szSetting, &dbv))
- return errorValue;
-// if(DBVT_TCHAR == dbv.type )
- errorValue = dbv.ptszVal;
- DBFreeVariant(&dbv);
- return errorValue;
-}
-
-std::string DBGetContactSettingStringPAN_A(HANDLE hContact, char const * szModule, char const * szSetting, std::string errorValue)
-{
- DBVARIANT dbv;
- //if(DBGetContactSetting(hContact, szModule, szSetting, &dbv))
- if(DBGetContactSettingString(hContact, szModule, szSetting, &dbv))
- return errorValue;
-// if(DBVT_ASCIIZ == dbv.type )
- errorValue = dbv.pszVal;
- DBFreeVariant(&dbv);
- return errorValue;
-}
-
-tstring &GetDlgItemString(HWND hwnd, int id)
-{
- HWND h = GetDlgItem(hwnd, id);
- int len = GetWindowTextLength(h);
- TCHAR * buf = new TCHAR[len + 1];
- GetWindowText(h, buf, len + 1);
- static tstring s;
- s = buf;
- delete []buf;
- return s;
-}
-
-std::string &GetProtoList()
-{
- static std::string s;
- return s = DBGetContactSettingStringPAN_A(NULL, pluginName, "protoList", "ICQ\r\n");
-}
-
-
-bool ProtoInList(std::string proto)
-{
- return std::string::npos != GetProtoList().find(proto + "\r\n");
-}
-
-int CreateCListGroup(TCHAR* szGroupName)
-{
- int hGroup;
- CLIST_INTERFACE *clint = NULL;
-
- if (ServiceExists(MS_CLIST_RETRIEVE_INTERFACE))
- clint = (CLIST_INTERFACE*)CallService(MS_CLIST_RETRIEVE_INTERFACE, 0, 0);
-
- hGroup = CallService(MS_CLIST_GROUPCREATE, 0, 0);
-
- TCHAR* usTmp = szGroupName;
-
- clint->pfnRenameGroup(hGroup, usTmp);
-
- return hGroup;
-}
-
-
-void RemoveExcludedUsers()
-{
- HANDLE hContact;
- HANDLE ToRemove[4096];
- int i = 0,a = 0;
- hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST, 0, 0);
- if(hContact)
- {
- do
- {
- if(DBGetContactSettingByte(hContact, "CList", "NotOnList", 0) && DBGetContactSettingByte(hContact, pluginName, "Excluded", 0))
- {
- ToRemove[i] = hContact;
- i++;
- }
- }
- while(hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT,(WPARAM)hContact, 0));
- ToRemove[i] = INVALID_HANDLE_VALUE;
- while(ToRemove[a] != INVALID_HANDLE_VALUE)
- {
- CallService(MS_DB_CONTACT_DELETE, (WPARAM)ToRemove[a], 0);
- a++;
- }
- }
-}
-
-void RemoveTemporaryUsers()
-{
- HANDLE hContact;
- HANDLE ToRemove[4096];
- int i = 0, a= 0;
- hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST, 0, 0);
- if(hContact)
- {
- do
- {
- if(DBGetContactSettingByte(hContact, "CList", "NotOnList", 0))
- {
- ToRemove[i] = hContact;
- i++;
- }
- }
- while(hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT,(WPARAM)hContact, 0));
- ToRemove[i] = INVALID_HANDLE_VALUE;
- while(ToRemove[a] != INVALID_HANDLE_VALUE)
- {
- CallService(MS_DB_CONTACT_DELETE, (WPARAM)ToRemove[a], 0);
- a++;
- }
- }
-}
-int RemoveTmp(WPARAM,LPARAM)
-{
- RemoveTemporaryUsers();
- return 0;
-}
-tstring variables_parse(tstring const &tstrFormat, HANDLE hContact){
- if (gbVarsServiceExist) {
- FORMATINFO fi;
- TCHAR *tszParsed;
- tstring tstrResult;
-
- ZeroMemory(&fi, sizeof(fi));
- fi.cbSize = sizeof(fi);
- fi.tszFormat = _tcsdup(tstrFormat.c_str());
- fi.hContact = hContact;
- fi.flags |= FIF_TCHAR;
- tszParsed = (TCHAR *)CallService(MS_VARS_FORMATSTRING, (WPARAM)&fi, 0);
- free(fi.tszFormat);
- if (tszParsed) {
- tstrResult = tszParsed;
- CallService(MS_VARS_FREEMEMORY, (WPARAM)tszParsed, 0);
- return tstrResult;
- }
- }
- return tstrFormat;
-}
-
-// case-insensitive _tcsstr
-//by nullbie as i remember...
-#define NEWTSTR_MALLOC(A) (A==NULL)?NULL:_tcscpy((TCHAR*)malloc(sizeof(TCHAR)*(_tcslen(A)+1)),A)
-const int Stricmp(const TCHAR *str, const TCHAR *substr)
-{
- int i;
- TCHAR *str_up = NEWTSTR_MALLOC(str);
- TCHAR *substr_up = NEWTSTR_MALLOC(substr);
-
- CharUpperBuff(str_up, lstrlen(str_up));
- CharUpperBuff(substr_up, lstrlen(substr_up));
-
- i = _tcscmp(str_up, substr_up);
-
- mir_free(str_up);
- mir_free(substr_up);
-
- return i;
-}
+#include "headers.h" + +tstring DBGetContactSettingStringPAN(HANDLE hContact, char const * szModule, char const * szSetting, tstring errorValue) +{ + DBVARIANT dbv; + //if(DBGetContactSetting(hContact, szModule, szSetting, &dbv)) + if(DBGetContactSettingTString(hContact, szModule, szSetting, &dbv)) + return errorValue; +// if(DBVT_TCHAR == dbv.type ) + errorValue = dbv.ptszVal; + DBFreeVariant(&dbv); + return errorValue; +} + +std::string DBGetContactSettingStringPAN_A(HANDLE hContact, char const * szModule, char const * szSetting, std::string errorValue) +{ + DBVARIANT dbv; + //if(DBGetContactSetting(hContact, szModule, szSetting, &dbv)) + if(DBGetContactSettingString(hContact, szModule, szSetting, &dbv)) + return errorValue; +// if(DBVT_ASCIIZ == dbv.type ) + errorValue = dbv.pszVal; + DBFreeVariant(&dbv); + return errorValue; +} + +tstring &GetDlgItemString(HWND hwnd, int id) +{ + HWND h = GetDlgItem(hwnd, id); + int len = GetWindowTextLength(h); + TCHAR * buf = new TCHAR[len + 1]; + GetWindowText(h, buf, len + 1); + static tstring s; + s = buf; + delete []buf; + return s; +} + +std::string &GetProtoList() +{ + static std::string s; + return s = DBGetContactSettingStringPAN_A(NULL, pluginName, "protoList", "ICQ\r\n"); +} + + +bool ProtoInList(std::string proto) +{ + return std::string::npos != GetProtoList().find(proto + "\r\n"); +} + +int CreateCListGroup(TCHAR* szGroupName) +{ + int hGroup; + CLIST_INTERFACE *clint = NULL; + + if (ServiceExists(MS_CLIST_RETRIEVE_INTERFACE)) + clint = (CLIST_INTERFACE*)CallService(MS_CLIST_RETRIEVE_INTERFACE, 0, 0); + + hGroup = CallService(MS_CLIST_GROUPCREATE, 0, 0); + + TCHAR* usTmp = szGroupName; + + clint->pfnRenameGroup(hGroup, usTmp); + + return hGroup; +} + + +void RemoveExcludedUsers() +{ + HANDLE hContact; + HANDLE ToRemove[4096]; + int i = 0,a = 0; + hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST, 0, 0); + if(hContact) + { + do + { + if(DBGetContactSettingByte(hContact, "CList", "NotOnList", 0) && DBGetContactSettingByte(hContact, pluginName, "Excluded", 0)) + { + ToRemove[i] = hContact; + i++; + } + } + while(hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT,(WPARAM)hContact, 0)); + ToRemove[i] = INVALID_HANDLE_VALUE; + while(ToRemove[a] != INVALID_HANDLE_VALUE) + { + CallService(MS_DB_CONTACT_DELETE, (WPARAM)ToRemove[a], 0); + a++; + } + } +} + +void RemoveTemporaryUsers() +{ + HANDLE hContact; + HANDLE ToRemove[4096]; + int i = 0, a= 0; + hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST, 0, 0); + if(hContact) + { + do + { + if(DBGetContactSettingByte(hContact, "CList", "NotOnList", 0)) + { + ToRemove[i] = hContact; + i++; + } + } + while(hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT,(WPARAM)hContact, 0)); + ToRemove[i] = INVALID_HANDLE_VALUE; + while(ToRemove[a] != INVALID_HANDLE_VALUE) + { + CallService(MS_DB_CONTACT_DELETE, (WPARAM)ToRemove[a], 0); + a++; + } + } +} +int RemoveTmp(WPARAM,LPARAM) +{ + RemoveTemporaryUsers(); + return 0; +} +tstring variables_parse(tstring const &tstrFormat, HANDLE hContact){ + if (gbVarsServiceExist) { + FORMATINFO fi; + TCHAR *tszParsed; + tstring tstrResult; + + ZeroMemory(&fi, sizeof(fi)); + fi.cbSize = sizeof(fi); + fi.tszFormat = _tcsdup(tstrFormat.c_str()); + fi.hContact = hContact; + fi.flags |= FIF_TCHAR; + tszParsed = (TCHAR *)CallService(MS_VARS_FORMATSTRING, (WPARAM)&fi, 0); + free(fi.tszFormat); + if (tszParsed) { + tstrResult = tszParsed; + CallService(MS_VARS_FREEMEMORY, (WPARAM)tszParsed, 0); + return tstrResult; + } + } + return tstrFormat; +} + +// case-insensitive _tcsstr +//by nullbie as i remember... +#define NEWTSTR_MALLOC(A) (A==NULL)?NULL:_tcscpy((TCHAR*)malloc(sizeof(TCHAR)*(_tcslen(A)+1)),A) +const int Stricmp(const TCHAR *str, const TCHAR *substr) +{ + int i; + TCHAR *str_up = NEWTSTR_MALLOC(str); + TCHAR *substr_up = NEWTSTR_MALLOC(substr); + + CharUpperBuff(str_up, lstrlen(str_up)); + CharUpperBuff(substr_up, lstrlen(substr_up)); + + i = _tcscmp(str_up, substr_up); + + mir_free(str_up); + mir_free(substr_up); + + return i; +} diff --git a/utilities.h b/utilities.h index c913491..04866f7 100644 --- a/utilities.h +++ b/utilities.h @@ -1,8 +1,8 @@ -tstring DBGetContactSettingStringPAN(HANDLE hContact, char const * szModule, char const * szSetting, tstring errorValue);
-std::string DBGetContactSettingStringPAN_A(HANDLE hContact, char const * szModule, char const * szSetting, std::string errorValue);
-tstring &GetDlgItemString(HWND hwnd, int id);
-std::string &GetProtoList();
-bool ProtoInList(std::string proto);
-void RemoveExcludedUsers();
-tstring variables_parse(tstring const &tstrFormat, HANDLE hContact);
-const int Stricmp(const TCHAR *str, const TCHAR *substr);
+tstring DBGetContactSettingStringPAN(HANDLE hContact, char const * szModule, char const * szSetting, tstring errorValue); +std::string DBGetContactSettingStringPAN_A(HANDLE hContact, char const * szModule, char const * szSetting, std::string errorValue); +tstring &GetDlgItemString(HWND hwnd, int id); +std::string &GetProtoList(); +bool ProtoInList(std::string proto); +void RemoveExcludedUsers(); +tstring variables_parse(tstring const &tstrFormat, HANDLE hContact); +const int Stricmp(const TCHAR *str, const TCHAR *substr); @@ -1,6 +1,6 @@ -#ifndef VERSION_H_CAA3B062_9BEE_40e6_A9F9_20BBF467731B
-#define VERSION_H_CAA3B062_9BEE_40e6_A9F9_20BBF467731B
-
-#define SUBWCREV (0)
-
-#endif
+#ifndef VERSION_H_CAA3B062_9BEE_40e6_A9F9_20BBF467731B +#define VERSION_H_CAA3B062_9BEE_40e6_A9F9_20BBF467731B + +#define SUBWCREV (0) + +#endif |