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/IRCG/src/ircproto.h | 6 +----- protocols/IRCG/src/main.cpp | 34 ++++++++++++++++++++-------------- 2 files changed, 21 insertions(+), 19 deletions(-) (limited to 'protocols/IRCG/src') diff --git a/protocols/IRCG/src/ircproto.h b/protocols/IRCG/src/ircproto.h index 8947ca68a2..bc7c19d6b7 100644 --- a/protocols/IRCG/src/ircproto.h +++ b/protocols/IRCG/src/ircproto.h @@ -420,11 +420,7 @@ private: struct CMPlugin : public ACCPROTOPLUGIN { - CMPlugin() : - ACCPROTOPLUGIN("IRC") - { - SetUniqueId("Nick"); - } + CMPlugin(); }; #endif // _IRCPROTO_H_ diff --git a/protocols/IRCG/src/main.cpp b/protocols/IRCG/src/main.cpp index 4d22b5dbad..5babb6b3d6 100644 --- a/protocols/IRCG/src/main.cpp +++ b/protocols/IRCG/src/main.cpp @@ -22,24 +22,28 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "stdafx.h" #include "version.h" +CMPlugin g_plugin; +int &hLangpack(g_plugin.m_hLang); CHAT_MANAGER *pci; CLIST_INTERFACE *pcli; -int &hLangpack(g_plugin.m_hLang); +///////////////////////////////////////////////////////////////////////////////////////// -static int CompareServers( const SERVER_INFO* p1, const SERVER_INFO* p2 ) +static int CompareServers(const SERVER_INFO* p1, const SERVER_INFO* p2) { - return mir_strcmp( p1->m_name, p2->m_name ); + return mir_strcmp(p1->m_name, p2->m_name); } -OBJLIST g_servers( 20, CompareServers ); +OBJLIST g_servers(20, CompareServers); -void UninitTimers( void ); +void UninitTimers(void); +///////////////////////////////////////////////////////////////////////////////////////// // Information about the plugin -PLUGININFOEX pluginInfo = + +static PLUGININFOEX pluginInfoEx = { - sizeof( PLUGININFOEX ), + sizeof(PLUGININFOEX), __PLUGIN_NAME, PLUGIN_MAKE_VERSION(__MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM), __DESC, @@ -48,17 +52,19 @@ PLUGININFOEX pluginInfo = __AUTHORWEB, UNICODE_AWARE, // {92382B4D-5572-48a0-B0B9-1336A601D689} - { 0x92382b4d, 0x5572, 0x48a0, {0xb0, 0xb9, 0x13, 0x36, 0xa6, 0x1, 0xd6, 0x89 }} + {0x92382b4d, 0x5572, 0x48a0, {0xb0, 0xb9, 0x13, 0x36, 0xa6, 0x1, 0xd6, 0x89}} }; -extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD) +CMPlugin::CMPlugin() : + ACCPROTOPLUGIN("IRC", pluginInfoEx) { - return &pluginInfo; + SetUniqueId("Nick"); } -///////////////////////////////////////////////////////////////////////////////////////// - -CMPlugin g_plugin; +extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD) +{ + return &pluginInfoEx; +} ///////////////////////////////////////////////////////////////////////////////////////// @@ -68,7 +74,7 @@ extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_PROTOC extern "C" int __declspec(dllexport) Load() { - mir_getLP(&pluginInfo); + mir_getLP(&pluginInfoEx); pci = Chat_GetInterface(); pcli = Clist_GetInterface(); -- cgit v1.2.3