diff options
-rw-r--r-- | plugins/StopSpamPlus/headers.h | 2 | ||||
-rw-r--r-- | plugins/StopSpamPlus/src/services.cpp | 1 | ||||
-rw-r--r-- | plugins/StopSpamPlus/src/stopspam.cpp | 4 |
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);
|