From 6fe89c25874a40e9383dfaccb14f360971fe694b Mon Sep 17 00:00:00 2001 From: sss Date: Sat, 4 Apr 2009 11:13:52 +0000 Subject: git-svn-id: http://172.18.13.13/svn/mim_plugs@17 63852ff1-2cfd-40b9-8011-e561a9d89b1c --- stopspam_mod/branches/0.0.1.5/init.cpp | 131 --------------------------------- 1 file changed, 131 deletions(-) delete mode 100644 stopspam_mod/branches/0.0.1.5/init.cpp (limited to 'stopspam_mod/branches/0.0.1.5/init.cpp') diff --git a/stopspam_mod/branches/0.0.1.5/init.cpp b/stopspam_mod/branches/0.0.1.5/init.cpp deleted file mode 100644 index 54a826d..0000000 --- a/stopspam_mod/branches/0.0.1.5/init.cpp +++ /dev/null @@ -1,131 +0,0 @@ -#include "headers.h" - - - -BOOL gbDosServiceExist = 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 gbDelNotInList = 0; -tstring gbSpammersGroup = _T("Spammers"); -tstring gbQuestion; -tstring gbAnswer; -tstring gbCongratulation; -std::string gbAuthRepl; -extern char * pluginDescription; -extern TCHAR const * defQuestion; - -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), - pluginName" mod", - PLUGIN_MAKE_VERSION(0, 0, 1, 5), - 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 -}; - -extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion) -{ - if ( mirandaVersion < PLUGIN_MAKE_VERSION( 0, 7, 0, 0 )) - return NULL; - - return &pluginInfoEx; -} - - -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_A(NULL, pluginName, "authrepl", "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); - gbDelNotInList = DBGetContactSettingByte(NULL, pluginName, "DelNotInList", 0); -} - -static int OnSystemModulesLoaded(WPARAM wParam,LPARAM lParam) -{ - if (ServiceExists(MS_DOS_SERVICE)) - gbDosServiceExist = 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; - mir_getMMI(&mmi); - mir_getUTFI(&utfi); - HookEvent(ME_SYSTEM_MODULESLOADED, OnSystemModulesLoaded); - - miranda::EventHooker::HookAll(); - return 0; -} - -extern "C" int __declspec(dllexport) Unload(void) -{ - miranda::EventHooker::UnhookAll(); - return 0; -} \ No newline at end of file -- cgit v1.2.3