diff options
author | George Hazan <ghazan@miranda.im> | 2019-01-08 20:17:56 +0200 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-01-08 20:17:56 +0200 |
commit | 1e857963fa96c1e2131fa799d8580c526f175cee (patch) | |
tree | 769c5792db89ddef0406e82eb4f18631e179c33a /protocols | |
parent | 3dde6141ff24f51d1f028c69f0b50c6e12135a2a (diff) |
fixes #1734 (dynamic plugin's presence checker)
Diffstat (limited to 'protocols')
-rwxr-xr-x | protocols/JabberG/src/jabber.cpp | 25 |
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));
|