summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/VersionInfo/src/hooked_events.cpp17
-rw-r--r--plugins/VersionInfo/src/hooked_events.h1
-rw-r--r--plugins/VersionInfo/src/main.cpp2
-rw-r--r--plugins/VersionInfo/src/services.cpp18
-rw-r--r--protocols/IcqOscarJ/src/icq_avatar.cpp2
5 files changed, 6 insertions, 34 deletions
diff --git a/plugins/VersionInfo/src/hooked_events.cpp b/plugins/VersionInfo/src/hooked_events.cpp
index 71fb4e649c..717aa6dda9 100644
--- a/plugins/VersionInfo/src/hooked_events.cpp
+++ b/plugins/VersionInfo/src/hooked_events.cpp
@@ -21,9 +21,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "common.h"
#include "hooked_events.h"
-HANDLE hModulesLoaded;
-HANDLE hOptionsInitialize;
-
#define HOST "http://eblis.tla.ro/projects"
#define VERSIONINFO_VERSION_URL HOST "/miranda/VersionInfo/updater/VersionInfo.html"
@@ -32,18 +29,8 @@ HANDLE hOptionsInitialize;
int HookEvents()
{
- hModulesLoaded = HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded);
- hOptionsInitialize = HookEvent(ME_OPT_INITIALISE, OnOptionsInitialise);
- //hPreShutdown = HookEvent(ME_SYSTEM_PRESHUTDOWN, OnPreShutdown);
-
- return 0;
-}
-
-int UnhookEvents()
-{
- UnhookEvent(hModulesLoaded);
- UnhookEvent(hOptionsInitialize);
-
+ HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded);
+ HookEvent(ME_OPT_INITIALISE, OnOptionsInitialise);
return 0;
}
diff --git a/plugins/VersionInfo/src/hooked_events.h b/plugins/VersionInfo/src/hooked_events.h
index b75b5e59a8..e63d138998 100644
--- a/plugins/VersionInfo/src/hooked_events.h
+++ b/plugins/VersionInfo/src/hooked_events.h
@@ -25,7 +25,6 @@ extern HANDLE hModulesLoaded;
extern HANDLE hOptionsInitialise;
int HookEvents();
-int UnhookEvents();
int OnModulesLoaded(WPARAM wParam, LPARAM lParam);
int OnOptionsInitialise(WPARAM wParam, LPARAM lParam);
diff --git a/plugins/VersionInfo/src/main.cpp b/plugins/VersionInfo/src/main.cpp
index 7a5810917d..f9143d34c7 100644
--- a/plugins/VersionInfo/src/main.cpp
+++ b/plugins/VersionInfo/src/main.cpp
@@ -104,7 +104,5 @@ extern "C" int __declspec(dllexport) Load(void)
extern "C" int __declspec(dllexport) Unload(void)
{
- UnhookEvents();
- DestroyServices();
return 0;
} \ No newline at end of file
diff --git a/plugins/VersionInfo/src/services.cpp b/plugins/VersionInfo/src/services.cpp
index 0efdb387f4..d78810637a 100644
--- a/plugins/VersionInfo/src/services.cpp
+++ b/plugins/VersionInfo/src/services.cpp
@@ -21,25 +21,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "common.h"
#include "services.h"
-HANDLE hsMenuCommand;
-HANDLE hsGetInfo;
-HANDLE hsServiceMode;
-
int bServiceMode = 0; //true only if plugin is running in service mode
int InitServices()
{
- hsMenuCommand = CreateServiceFunction(MS_VERSIONINFO_MENU_COMMAND, PluginMenuCommand);
- hsGetInfo = CreateServiceFunction(MS_VERSIONINFO_GETINFO, GetInfoService);
- hsServiceMode = CreateServiceFunction(MS_SERVICEMODE_LAUNCH, ServiceModeService);
- return 0;
-}
-
-int DestroyServices()
-{
- DestroyServiceFunction(hsMenuCommand);
- DestroyServiceFunction(hsGetInfo);
- DestroyServiceFunction(hsServiceMode);
+ CreateServiceFunction(MS_VERSIONINFO_MENU_COMMAND, PluginMenuCommand);
+ CreateServiceFunction(MS_VERSIONINFO_GETINFO, GetInfoService);
+ CreateServiceFunction(MS_SERVICEMODE_LAUNCH, ServiceModeService);
return 0;
}
diff --git a/protocols/IcqOscarJ/src/icq_avatar.cpp b/protocols/IcqOscarJ/src/icq_avatar.cpp
index f302d3df81..fb851e7d2f 100644
--- a/protocols/IcqOscarJ/src/icq_avatar.cpp
+++ b/protocols/IcqOscarJ/src/icq_avatar.cpp
@@ -92,7 +92,7 @@ void CIcqProto::InitAvatars()
// check if it does make sense
TCHAR tszPath[MAX_PATH * 2];
- null_snprintf(tszPath, MAX_PATH * 2, _T("%%miranda_avatarcache%%\\%S\\"), m_szModuleName);
+ null_snprintf(tszPath, MAX_PATH * 2, _T("%%miranda_avatarcache%%\\%S"), m_szModuleName);
hAvatarsFolder = FoldersRegisterCustomPathT("Avatars", m_szModuleName, tszPath);
}