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/ConnectionNotify | |
parent | d75fed3bfc9c252f5d20b889e0bec95fb0a4527e (diff) |
all protocols rewritten to CMPluginBase
Diffstat (limited to 'plugins/ConnectionNotify')
-rw-r--r-- | plugins/ConnectionNotify/src/ConnectionNotify.cpp | 20 | ||||
-rw-r--r-- | plugins/ConnectionNotify/src/stdafx.h | 1 |
2 files changed, 14 insertions, 7 deletions
diff --git a/plugins/ConnectionNotify/src/ConnectionNotify.cpp b/plugins/ConnectionNotify/src/ConnectionNotify.cpp index cb1e82dbec..a703a9f5a2 100644 --- a/plugins/ConnectionNotify/src/ConnectionNotify.cpp +++ b/plugins/ConnectionNotify/src/ConnectionNotify.cpp @@ -859,13 +859,7 @@ extern "C" int __declspec(dllexport) Load(void) LoadSettings();
connExceptions = LoadSettingsConnections();
- PROTOCOLDESCRIPTOR pd = { 0 };
- pd.cbSize = sizeof(pd);
- pd.szName = PLUGINNAME;
- pd.type = PROTOTYPE_PROTOCOL;
- Proto_RegisterModule(&pd);
-
- //set all contacts to offline
+ // set all contacts to offline
for (auto &hContact : Contacts(PLUGINNAME))
db_set_w(hContact, PLUGINNAME, "status", ID_STATUS_OFFLINE);
@@ -903,3 +897,15 @@ extern "C" int __declspec(dllexport) Unload(void) #endif
return 0;
}
+
+/////////////////////////////////////////////////////////////////////////////////////////
+
+struct CMPlugin : public CMPluginBase
+{
+ CMPlugin() :
+ CMPluginBase(PLUGINNAME)
+ {
+ RegisterProtocol(PROTOTYPE_PROTOCOL);
+ }
+}
+ g_plugin;
diff --git a/plugins/ConnectionNotify/src/stdafx.h b/plugins/ConnectionNotify/src/stdafx.h index 2837c72125..201a5a233f 100644 --- a/plugins/ConnectionNotify/src/stdafx.h +++ b/plugins/ConnectionNotify/src/stdafx.h @@ -16,6 +16,7 @@ #include <m_utils.h>
#include <m_protosvc.h>
#include <m_system.h>
+#include <m_plugin.h>
#ifdef _DEBUG
#include "debug.h"
|