diff options
author | George Hazan <ghazan@miranda.im> | 2019-02-15 18:45:14 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-02-15 18:45:14 +0300 |
commit | 1367e7c22f39bc3edadd92c99e0142ab5b1357a4 (patch) | |
tree | 845a70be2c060510d395230b2ee1306da3209800 /protocols/ICQ-WIM/src | |
parent | 8b82faab1e41341c3a3d2ae40b999469020bedc3 (diff) |
fix for proper MRA registration
Diffstat (limited to 'protocols/ICQ-WIM/src')
-rw-r--r-- | protocols/ICQ-WIM/src/main.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/protocols/ICQ-WIM/src/main.cpp b/protocols/ICQ-WIM/src/main.cpp index cd55059b6c..cd1ee70f46 100644 --- a/protocols/ICQ-WIM/src/main.cpp +++ b/protocols/ICQ-WIM/src/main.cpp @@ -54,6 +54,12 @@ struct CMPluginMra : public ACCPROTOPLUGIN<CIcqProto> { SetUniqueId(DB_KEY_ID); } + + void Register() + { + m_hInst = g_plugin.getInst(); + RegisterProtocol(PROTOTYPE_PROTOCOL, g_plugin.fnInit, g_plugin.fnUninit); + } } static g_pluginMra; @@ -62,7 +68,6 @@ static g_pluginMra; CMPlugin::CMPlugin() : ACCPROTOPLUGIN<CIcqProto>(MODULENAME, pluginInfoEx) { - g_pluginMra.setInst(m_hInst); SetUniqueId(DB_KEY_ID); } @@ -128,6 +133,9 @@ static int OnModulesLoaded(WPARAM, LPARAM) int CMPlugin::Load() { + // register the second instance of this plugin as MRA + g_pluginMra.Register(); + g_hwndHeartbeat = CreateWindowEx(0, L"STATIC", nullptr, 0, 0, 0, 0, 0, nullptr, nullptr, nullptr, nullptr); registerIcon("Protocols/ICQ", iconList, "ICQ"); @@ -136,7 +144,7 @@ int CMPlugin::Load() HookEvent(ME_SYSTEM_MODULEUNLOAD, ModuleLoad); HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded); return 0; -}; +} int CMPlugin::Unload() { |