From a905c9c3f92fd54f37a5466649ac378db69e7cb0 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 28 Mar 2018 14:29:31 +0300 Subject: all protocols rewritten to CMPluginBase --- plugins/LotusNotify/src/LotusNotify.cpp | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'plugins/LotusNotify/src/LotusNotify.cpp') diff --git a/plugins/LotusNotify/src/LotusNotify.cpp b/plugins/LotusNotify/src/LotusNotify.cpp index d13ff2253c..344bf56f18 100644 --- a/plugins/LotusNotify/src/LotusNotify.cpp +++ b/plugins/LotusNotify/src/LotusNotify.cpp @@ -1708,13 +1708,6 @@ extern "C" int __declspec(dllexport) Load(void) Menu_EnableItem(hMenuHandle, FALSE); } - // create protocol - PROTOCOLDESCRIPTOR pd = { 0 }; - pd.cbSize = sizeof(pd); - pd.szName = PLUGINNAME; - pd.type = PROTOTYPE_PROTOCOL; - Proto_RegisterModule(&pd); - // set all contacts to offline for (auto &hContact : Contacts(PLUGINNAME)) db_set_w(hContact, PLUGINNAME, "status", ID_STATUS_OFFLINE); @@ -1777,3 +1770,15 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD dwReason, LPVOID ) } return TRUE; } + +///////////////////////////////////////////////////////////////////////////////////////// + +struct CMPlugin : public CMPluginBase +{ + CMPlugin() : + CMPluginBase(PLUGINNAME) + { + RegisterProtocol(PROTOTYPE_PROTOCOL); + } +} + g_plugin; -- cgit v1.2.3