summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xprotocols/JabberG/src/jabber.cpp25
1 files changed, 17 insertions, 8 deletions
diff --git a/protocols/JabberG/src/jabber.cpp b/protocols/JabberG/src/jabber.cpp
index 7e53cc2fed..3cb8afcb14 100755
--- a/protocols/JabberG/src/jabber.cpp
+++ b/protocols/JabberG/src/jabber.cpp
@@ -88,18 +88,21 @@ static INT_PTR g_SvcParseXmppUri(WPARAM w, LPARAM l)
return 0;
}
-static int OnModulesLoaded(WPARAM, LPARAM)
+static int OnLoadModule(WPARAM, LPARAM)
{
- HookEvent(ME_TTB_MODULELOADED, g_OnToolbarInit);
-
bSecureIM = ServiceExists("SecureIM/IsContactSecured") != 0;
bMirOTR = GetModuleHandle(L"mirotr.dll") != nullptr;
bNewGPG = GetModuleHandle(L"new_gpg.dll") != nullptr;
- #ifdef _WIN64
- bPlatform = 1;
- #else
- bPlatform = 0;
- #endif
+ return 0;
+}
+
+static int OnModulesLoaded(WPARAM, LPARAM)
+{
+ HookEvent(ME_TTB_MODULELOADED, g_OnToolbarInit);
+
+ HookEvent(ME_SYSTEM_MODULELOAD, OnLoadModule);
+ HookEvent(ME_SYSTEM_MODULEUNLOAD, OnLoadModule);
+ OnLoadModule(0, 0);
// file associations manager plugin support
if (ServiceExists(MS_ASSOCMGR_ADDNEWURLTYPE)) {
@@ -147,6 +150,12 @@ static int OnModulesLoaded(WPARAM, LPARAM)
int CMPlugin::Load()
{
+ #ifdef _WIN64
+ bPlatform = 1;
+ #else
+ bPlatform = 0;
+ #endif
+
char mirVer[100];
Miranda_GetVersionText(mirVer, _countof(mirVer));
mir_wstrcpy(szCoreVersion, _A2T(mirVer));