summaryrefslogtreecommitdiff
path: root/plugins/StopSpamPlus
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2017-09-18 17:11:09 +0300
committerGeorge Hazan <ghazan@miranda.im>2017-09-18 17:11:09 +0300
commit1836e8aa8a20b7339fd27c67acef67b7eb446da4 (patch)
treef2882fe952b215551b68d6ce14f3e02fd221905a /plugins/StopSpamPlus
parenta218ab1bbf4f7c343d40c5c8a956cf6a0a769341 (diff)
garbage code removed
Diffstat (limited to 'plugins/StopSpamPlus')
-rw-r--r--plugins/StopSpamPlus/src/services.cpp1
-rw-r--r--plugins/StopSpamPlus/src/stdafx.h1
-rw-r--r--plugins/StopSpamPlus/src/stopspam.cpp18
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