diff options
Diffstat (limited to 'stopspam/src')
-rw-r--r-- | stopspam/src/events.cpp | 6 | ||||
-rw-r--r-- | stopspam/src/services.cpp | 2 | ||||
-rw-r--r-- | stopspam/src/stopspam.cpp | 9 |
3 files changed, 12 insertions, 5 deletions
diff --git a/stopspam/src/events.cpp b/stopspam/src/events.cpp index fa73a07..74d4195 100644 --- a/stopspam/src/events.cpp +++ b/stopspam/src/events.cpp @@ -46,13 +46,15 @@ MIRANDA_HOOK_EVENT(ME_DB_EVENT_ADDED, wParam, lParam) #ifdef _UNICODE
AuthRepl=mir_u2a(variables_parse(plSets->AuthRepl.Get(), hcntct).c_str());
#else
- AuthRepl=mir_strdup( variables_parse(plSets->AuthRepl.Get(), hcntct).c_str());
+ AuthRepl=variables_parse(plSets->AuthRepl.Get(), hcntct).c_str();
#endif
// ...send message
std::string allowService = dbei.szModule;
allowService += PS_AUTHDENY;
CallService(allowService.c_str(), (WPARAM)hDbEvent, (LPARAM)AuthRepl);
- mir_free(AuthRepl);
+ #ifdef _UNICODE
+ mir_free(AuthRepl);
+ #endif
DBWriteContactSettingByte(hcntct, "CList", "NotOnList", 1);
DBWriteContactSettingByte(hcntct, "CList", "Hidden", 1);
if (!plSets->HistLog.Get())
diff --git a/stopspam/src/services.cpp b/stopspam/src/services.cpp index 12ff332..2ea6bc5 100644 --- a/stopspam/src/services.cpp +++ b/stopspam/src/services.cpp @@ -72,7 +72,7 @@ INT_PTR RemoveTempContacts(WPARAM wParam,LPARAM lParam) return 0;
}
-INT_PTR OnSystemModulesLoaded(WPARAM wParam,LPARAM lParam)
+int OnSystemModulesLoaded(WPARAM wParam, LPARAM lParam)
{
if (plSets->RemTmpAll.Get())
RemoveTempContacts(0,0);
diff --git a/stopspam/src/stopspam.cpp b/stopspam/src/stopspam.cpp index 4b84d10..ed1f203 100644 --- a/stopspam/src/stopspam.cpp +++ b/stopspam/src/stopspam.cpp @@ -4,7 +4,7 @@ struct MM_INTERFACE mmi; UTF8_INTERFACE utfi;
-HANDLE hFunc;
+HANDLE hFunc, hTempRemove;
/////////////////////////////////////////////////////////////////////////////////////////
@@ -74,7 +74,7 @@ extern "C" int __declspec(dllexport) Load(PLUGINLINK *link) HookEvent(ME_SYSTEM_MODULESLOADED, OnSystemModulesLoaded);
// Add deliting temporary contacts
- CreateServiceFunction(pluginName"/RemoveTempContacts", RemoveTempContacts);
+ hTempRemove = CreateServiceFunction(pluginName"/RemoveTempContacts", RemoveTempContacts);
ZeroMemory(&mi, sizeof(mi));
mi.cbSize = sizeof(mi);
mi.position = -0x7FFFFFFF;
@@ -97,6 +97,11 @@ extern "C" int __declspec(dllexport) Unload(void) DestroyServiceFunction(hFunc);
hFunc = 0;
}
+ if(hTempRemove)
+ {
+ DestroyServiceFunction(hTempRemove);
+ hFunc = 0;
+ }
delete plSets;
return 0;
|