diff options
author | George Hazan <ghazan@miranda.im> | 2018-03-28 14:29:31 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-03-28 14:29:31 +0300 |
commit | a905c9c3f92fd54f37a5466649ac378db69e7cb0 (patch) | |
tree | 87a60dadfbf9fd8d916ea9100c26b6e314293242 /plugins/Non-IM Contact/src | |
parent | d75fed3bfc9c252f5d20b889e0bec95fb0a4527e (diff) |
all protocols rewritten to CMPluginBase
Diffstat (limited to 'plugins/Non-IM Contact/src')
-rw-r--r-- | plugins/Non-IM Contact/src/main.cpp | 17 | ||||
-rw-r--r-- | plugins/Non-IM Contact/src/stdafx.h | 1 |
2 files changed, 14 insertions, 4 deletions
diff --git a/plugins/Non-IM Contact/src/main.cpp b/plugins/Non-IM Contact/src/main.cpp index 43123d7a3f..fd7de1059d 100644 --- a/plugins/Non-IM Contact/src/main.cpp +++ b/plugins/Non-IM Contact/src/main.cpp @@ -127,10 +127,7 @@ extern "C" __declspec(dllexport) int Load() HookEvent(ME_OPT_INITIALISE, NimcOptInit);
HookEvent(ME_CLIST_STATUSMODECHANGE, SetLCStatus);
- PROTOCOLDESCRIPTOR pd = { PROTOCOLDESCRIPTOR_V3_SIZE, MODNAME, PROTOTYPE_VIRTUAL };
- Proto_RegisterModule(&pd);
-
- //load services (the first 5 are the basic ones needed to make a new protocol)
+ // load services (the first 5 are the basic ones needed to make a new protocol)
CreateProtoServiceFunction(MODNAME, PS_GETCAPS, GetLCCaps);
CreateProtoServiceFunction(MODNAME, PS_GETNAME, GetLCName);
CreateProtoServiceFunction(MODNAME, PS_LOADICON, LoadLCIcon);
@@ -204,3 +201,15 @@ extern "C" __declspec(dllexport) int Unload(void) killTimer();
return 0;
}
+
+/////////////////////////////////////////////////////////////////////////////////////////
+
+struct CMPlugin : public CMPluginBase
+{
+ CMPlugin() :
+ CMPluginBase(MODNAME)
+ {
+ RegisterProtocol(PROTOTYPE_VIRTUAL);
+ }
+}
+ g_plugin;
diff --git a/plugins/Non-IM Contact/src/stdafx.h b/plugins/Non-IM Contact/src/stdafx.h index ce265a31bd..c5495b3b09 100644 --- a/plugins/Non-IM Contact/src/stdafx.h +++ b/plugins/Non-IM Contact/src/stdafx.h @@ -44,6 +44,7 @@ struct DLGTEMPLATEEX #include <m_utils.h>
#include <m_ignore.h>
#include <m_netlib.h>
+#include <m_plugin.h>
#include <m_string.h>
#include <win2k.h>
|