From 1836e8aa8a20b7339fd27c67acef67b7eb446da4 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 18 Sep 2017 17:11:09 +0300 Subject: garbage code removed --- plugins/StopSpamPlus/src/services.cpp | 1 - plugins/StopSpamPlus/src/stdafx.h | 1 - plugins/StopSpamPlus/src/stopspam.cpp | 18 +++--------------- 3 files changed, 3 insertions(+), 17 deletions(-) diff --git a/plugins/StopSpamPlus/src/services.cpp b/plugins/StopSpamPlus/src/services.cpp index d0d4021ea4..31863978a3 100644 --- a/plugins/StopSpamPlus/src/services.cpp +++ b/plugins/StopSpamPlus/src/services.cpp @@ -70,7 +70,6 @@ INT_PTR RemoveTempContacts(WPARAM, LPARAM lParam) int OnSystemModulesLoaded(WPARAM, LPARAM) { - UnhookEvent(hLoadHook); if (plSets->RemTmpAll.Get()) RemoveTempContacts(0, 1); return 0; diff --git a/plugins/StopSpamPlus/src/stdafx.h b/plugins/StopSpamPlus/src/stdafx.h index 8e521c120d..b326d51369 100644 --- a/plugins/StopSpamPlus/src/stdafx.h +++ b/plugins/StopSpamPlus/src/stdafx.h @@ -36,7 +36,6 @@ extern wchar_t * pluginDescription; extern wchar_t const * infTalkProtPrefix; extern char const * answeredSetting; extern char const * questCountSetting; -extern HANDLE hLoadHook; extern HINSTANCE hInst; //options diff --git a/plugins/StopSpamPlus/src/stopspam.cpp b/plugins/StopSpamPlus/src/stopspam.cpp index b2bf80d2d6..9992a8915f 100644 --- a/plugins/StopSpamPlus/src/stopspam.cpp +++ b/plugins/StopSpamPlus/src/stopspam.cpp @@ -1,6 +1,5 @@ #include "stdafx.h" -HANDLE hFunc, hTempRemove, hLoadHook; int hLangpack; ///////////////////////////////////////////////////////////////////////////////////////// @@ -42,12 +41,12 @@ extern "C" int __declspec(dllexport) Load(void) plSets = new Settings; - hFunc = CreateServiceFunction(MS_STOPSPAM_CONTACTPASSED, IsContactPassed); + CreateServiceFunction(MS_STOPSPAM_CONTACTPASSED, IsContactPassed); - hLoadHook = HookEvent(ME_SYSTEM_MODULESLOADED, OnSystemModulesLoaded); + HookEvent(ME_SYSTEM_MODULESLOADED, OnSystemModulesLoaded); // Add deliting temporary contacts - hTempRemove = CreateServiceFunction(MS_STOPSPAM_REMTEMPCONTACTS, RemoveTempContacts); + CreateServiceFunction(MS_STOPSPAM_REMTEMPCONTACTS, RemoveTempContacts); CMenuItem mi; SET_UID(mi, 0xf2164e17, 0xa4c1, 0x4b07, 0xae, 0x81, 0x9e, 0xae, 0x7f, 0xa2, 0x55, 0x13); @@ -66,17 +65,6 @@ extern "C" int __declspec(dllexport) Unload(void) { miranda::EventHooker::UnhookAll(); - if (hFunc) - { - DestroyServiceFunction(hFunc); - hFunc = 0; - } - if (hTempRemove) - { - DestroyServiceFunction(hTempRemove); - hTempRemove = 0; - } delete plSets; - return 0; } \ No newline at end of file -- cgit v1.2.3