From b12321b9897b511e94301b73c1c48c533412d739 Mon Sep 17 00:00:00 2001 From: Mataes Date: Wed, 16 May 2018 19:12:38 +0300 Subject: BossKey, BuddyExpectator, BuddyPounce, ChangeKeyboardLayout, ClientChangeNotify, Cln_skinedit, CmdLine: cmplugin adaptation --- plugins/CmdLine/src/CmdLine.cpp | 11 ++--------- plugins/CmdLine/src/stdafx.h | 12 ++++++++---- 2 files changed, 10 insertions(+), 13 deletions(-) (limited to 'plugins/CmdLine/src') diff --git a/plugins/CmdLine/src/CmdLine.cpp b/plugins/CmdLine/src/CmdLine.cpp index b84d0e75e5..745c9fb389 100644 --- a/plugins/CmdLine/src/CmdLine.cpp +++ b/plugins/CmdLine/src/CmdLine.cpp @@ -20,8 +20,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "stdafx.h" -char ModuleName[] = "CmdLine"; -HINSTANCE hInstance; +CMPlugin g_plugin; int hLangpack; CLIST_INTERFACE *pcli; @@ -46,7 +45,7 @@ extern "C" __declspec(dllexport) PLUGININFOEX *MirandaPluginInfoEx(DWORD) extern "C" int __declspec(dllexport) Load(void) { mir_getLP(&pluginInfo); - pcli = Clist_GetInterface(); + pcli = Clist_GetInterface(); if (InitServer()) MessageBox(nullptr, TranslateT("Could not initialize CmdLine plugin property"), TranslateT("Error"), MB_ICONEXCLAMATION | MB_OK); @@ -64,9 +63,3 @@ extern "C" int __declspec(dllexport) Unload() DestroyServer(); return 0; } - -bool WINAPI DllMain(HINSTANCE hinstDLL, DWORD, LPVOID) -{ - hInstance = hinstDLL; - return TRUE; -} diff --git a/plugins/CmdLine/src/stdafx.h b/plugins/CmdLine/src/stdafx.h index 23ae2a12fb..5e2f33eed5 100644 --- a/plugins/CmdLine/src/stdafx.h +++ b/plugins/CmdLine/src/stdafx.h @@ -26,8 +26,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include #include -#define __NO_CMPLUGIN_NEEDED - #include "newpluginapi.h" #include "m_database.h" #include "m_clist.h" @@ -56,8 +54,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "mimcmd_handlers.h" #include "mimcmd_data.h" -extern char ModuleName[]; -extern HINSTANCE hInstance; +#define ModuleName "CmdLine" + +struct CMPlugin : public PLUGIN +{ + CMPlugin() : + PLUGIN(ModuleName) + {} +}; extern int bUseANSIStrings; -- cgit v1.2.3