summaryrefslogtreecommitdiff
path: root/plugins/StopSpamPlus
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2012-05-21 09:57:57 +0000
committerKirill Volinsky <mataes2007@gmail.com>2012-05-21 09:57:57 +0000
commitc44981c03b71364fc42125594447d142ed9ed442 (patch)
tree4193d1a181c7c11eefc1c7fd033d564effb13af7 /plugins/StopSpamPlus
parenteec9900927f176139f99921964a87eb6bc4df780 (diff)
StopSpam:
Unhook hooked event git-svn-id: http://svn.miranda-ng.org/main/trunk@117 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/StopSpamPlus')
-rw-r--r--plugins/StopSpamPlus/headers.h2
-rw-r--r--plugins/StopSpamPlus/src/services.cpp1
-rw-r--r--plugins/StopSpamPlus/src/stopspam.cpp4
3 files changed, 4 insertions, 3 deletions
diff --git a/plugins/StopSpamPlus/headers.h b/plugins/StopSpamPlus/headers.h
index 2adfa0cdf0..d80060d668 100644
--- a/plugins/StopSpamPlus/headers.h
+++ b/plugins/StopSpamPlus/headers.h
@@ -39,7 +39,7 @@ extern char * pluginDescription;
extern TCHAR const * infTalkProtPrefix;
extern char const * answeredSetting;
extern char const * questCountSetting;
-
+extern HANDLE hLoadHook;
extern HINSTANCE hInst;
#ifdef _UNICODE
diff --git a/plugins/StopSpamPlus/src/services.cpp b/plugins/StopSpamPlus/src/services.cpp
index 57aaf808df..1f9097446d 100644
--- a/plugins/StopSpamPlus/src/services.cpp
+++ b/plugins/StopSpamPlus/src/services.cpp
@@ -76,6 +76,7 @@ INT_PTR RemoveTempContacts(WPARAM wParam,LPARAM lParam)
int OnSystemModulesLoaded(WPARAM wParam, LPARAM lParam)
{
+ UnhookEvent(hLoadHook);
if (plSets->RemTmpAll.Get())
RemoveTempContacts(0,1);
return 0;
diff --git a/plugins/StopSpamPlus/src/stopspam.cpp b/plugins/StopSpamPlus/src/stopspam.cpp
index b61ea6039b..a6a6863505 100644
--- a/plugins/StopSpamPlus/src/stopspam.cpp
+++ b/plugins/StopSpamPlus/src/stopspam.cpp
@@ -2,7 +2,7 @@
struct MM_INTERFACE mmi;
UTF8_INTERFACE utfi;
-HANDLE hFunc, hTempRemove;
+HANDLE hFunc, hTempRemove, hLoadHook;
int hLangpack;
/////////////////////////////////////////////////////////////////////////////////////////
@@ -70,7 +70,7 @@ extern "C" int __declspec(dllexport) Load(PLUGINLINK *link)
hFunc = CreateServiceFunction(MS_STOPSPAM_CONTACTPASSED, IsContactPassed);
- HookEvent(ME_SYSTEM_MODULESLOADED, OnSystemModulesLoaded);
+ hLoadHook = HookEvent(ME_SYSTEM_MODULESLOADED, OnSystemModulesLoaded);
// Add deliting temporary contacts
hTempRemove = CreateServiceFunction(MS_STOPSPAM_REMTEMPCONTACTS, RemoveTempContacts);