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/Discord/src/main.cpp | 12 +++++++++--- protocols/Discord/src/proto.h | 6 +----- 2 files changed, 10 insertions(+), 8 deletions(-) (limited to 'protocols/Discord/src') diff --git a/protocols/Discord/src/main.cpp b/protocols/Discord/src/main.cpp index 1076f3f503..3fadfdfa03 100644 --- a/protocols/Discord/src/main.cpp +++ b/protocols/Discord/src/main.cpp @@ -21,7 +21,7 @@ CHAT_MANAGER *pci; int &hLangpack(g_plugin.m_hLang); HWND g_hwndHeartbeat; -PLUGININFOEX pluginInfo = { +PLUGININFOEX pluginInfoEx = { sizeof(PLUGININFOEX), __PLUGIN_NAME, PLUGIN_MAKE_VERSION(__MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM), @@ -34,9 +34,15 @@ PLUGININFOEX pluginInfo = { { 0x88928401, 0x2ce8, 0x4568, { 0xaa, 0xa7, 0x22, 0x61, 0x41, 0x87, 0x0c, 0xbf } } }; +CMPlugin::CMPlugin() : + ACCPROTOPLUGIN("Discord", pluginInfoEx) +{ + SetUniqueId(DB_KEY_ID); +} + extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD) { - return &pluginInfo; + return &pluginInfoEx; } ///////////////////////////////////////////////////////////////////////////////////////// @@ -59,7 +65,7 @@ IconItem g_iconList[] = extern "C" int __declspec(dllexport) Load(void) { - mir_getLP(&pluginInfo); + mir_getLP(&pluginInfoEx); pci = Chat_GetInterface(); g_hwndHeartbeat = CreateWindowEx(0, L"STATIC", nullptr, 0, 0, 0, 0, 0, nullptr, nullptr, nullptr, nullptr); diff --git a/protocols/Discord/src/proto.h b/protocols/Discord/src/proto.h index 8723c072d5..c47875950f 100644 --- a/protocols/Discord/src/proto.h +++ b/protocols/Discord/src/proto.h @@ -364,9 +364,5 @@ public: struct CMPlugin : public ACCPROTOPLUGIN { - CMPlugin() : - ACCPROTOPLUGIN("Discord") - { - SetUniqueId(DB_KEY_ID); - } + CMPlugin(); }; -- cgit v1.2.3