From 8a74e7495ce5ad39de4f5c25121a84d35df90c36 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 20 May 2018 15:08:48 +0300 Subject: CMPlugin to receive a reference to PLUGININFOEX --- protocols/Omegle/src/main.cpp | 19 ++++++++++++------- protocols/Omegle/src/proto.h | 6 +----- 2 files changed, 13 insertions(+), 12 deletions(-) (limited to 'protocols/Omegle/src') diff --git a/protocols/Omegle/src/main.cpp b/protocols/Omegle/src/main.cpp index 3dcb03603c..14bff0f0ae 100644 --- a/protocols/Omegle/src/main.cpp +++ b/protocols/Omegle/src/main.cpp @@ -24,13 +24,16 @@ along with this program. If not, see . // TODO: Make following as "globals" structure? +CMPlugin g_plugin; CLIST_INTERFACE* pcli; int &hLangpack(g_plugin.m_hLang); std::string g_strUserAgent; DWORD g_mirandaVersion; -PLUGININFOEX pluginInfo = { +///////////////////////////////////////////////////////////////////////////////////////// + +PLUGININFOEX pluginInfoEx = { sizeof(PLUGININFOEX), __PLUGIN_NAME, PLUGIN_MAKE_VERSION(__MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM), @@ -43,16 +46,18 @@ PLUGININFOEX pluginInfo = { { 0x9e1d9244, 0x606c, 0x4ef4, { 0x99, 0xa0, 0x1d, 0x7d, 0x23, 0xcb, 0x76, 0x1 } } }; +CMPlugin::CMPlugin() : + ACCPROTOPLUGIN("Omegle", pluginInfoEx) +{ + SetUniqueId("Nick"); +} + extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion) { g_mirandaVersion = mirandaVersion; - return &pluginInfo; + return &pluginInfoEx; } -///////////////////////////////////////////////////////////////////////////////////////// - -CMPlugin g_plugin; - ///////////////////////////////////////////////////////////////////////////////////////// // Interface information @@ -63,7 +68,7 @@ extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_PROTOC extern "C" int __declspec(dllexport) Load(void) { - mir_getLP(&pluginInfo); + mir_getLP(&pluginInfoEx); pcli = Clist_GetInterface(); InitIcons(); diff --git a/protocols/Omegle/src/proto.h b/protocols/Omegle/src/proto.h index dd81adcaad..d36c1862bf 100644 --- a/protocols/Omegle/src/proto.h +++ b/protocols/Omegle/src/proto.h @@ -104,9 +104,5 @@ public: struct CMPlugin : public ACCPROTOPLUGIN { - CMPlugin() : - ACCPROTOPLUGIN("Omegle") - { - SetUniqueId("Nick"); - } + CMPlugin(); }; -- cgit v1.2.3