summaryrefslogtreecommitdiff
path: root/plugins/CmdLine/src
diff options
context:
space:
mode:
authorMataes <mataes2007@gmail.com>2018-05-16 19:12:38 +0300
committerMataes <mataes2007@gmail.com>2018-05-16 19:12:38 +0300
commitb12321b9897b511e94301b73c1c48c533412d739 (patch)
treeaeec4c481dc82376e22879e76a81fd2abb7138f5 /plugins/CmdLine/src
parent3c4beeb99d4324fb453e928421c9b13d70ab4923 (diff)
BossKey, BuddyExpectator, BuddyPounce, ChangeKeyboardLayout, ClientChangeNotify, Cln_skinedit, CmdLine: cmplugin adaptation
Diffstat (limited to 'plugins/CmdLine/src')
-rw-r--r--plugins/CmdLine/src/CmdLine.cpp11
-rw-r--r--plugins/CmdLine/src/stdafx.h12
2 files changed, 10 insertions, 13 deletions
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 <time.h>
#include <stdlib.h>
-#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>
+{
+ CMPlugin() :
+ PLUGIN<CMPlugin>(ModuleName)
+ {}
+};
extern int bUseANSIStrings;