From 81ce57622c3166830b23eae534dacc6b008c659d Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 28 Mar 2018 16:34:30 +0300 Subject: common protocol instance management code went into template --- protocols/IcqOscarJ/src/init.cpp | 26 +------------------------- 1 file changed, 1 insertion(+), 25 deletions(-) (limited to 'protocols/IcqOscarJ/src/init.cpp') diff --git a/protocols/IcqOscarJ/src/init.cpp b/protocols/IcqOscarJ/src/init.cpp index fb53d2312e..46e5b68c17 100644 --- a/protocols/IcqOscarJ/src/init.cpp +++ b/protocols/IcqOscarJ/src/init.cpp @@ -28,6 +28,7 @@ #include "m_extraicons.h" #include "m_icolib.h" +CMPlugin g_plugin; HINSTANCE hInst; int hLangpack; CLIST_INTERFACE *pcli; @@ -161,28 +162,3 @@ void CIcqProto::UpdateGlobalSettings() m_bMoodsEnabled = getByte("MoodsEnabled", DEFAULT_MOODS_ENABLED); } -///////////////////////////////////////////////////////////////////////////////////////// - -static PROTO_INTERFACE* icqProtoInit(const char* pszProtoName, const wchar_t* tszUserName) -{ - CIcqProto *ppro = new CIcqProto(pszProtoName, tszUserName); - g_Instances.insert(ppro); - return ppro; -} - -static int icqProtoUninit(PROTO_INTERFACE* ppro) -{ - g_Instances.remove((CIcqProto*)ppro); - delete (CIcqProto*)ppro; - return 0; -} - -struct CMPlugin : public CMPluginBase -{ - CMPlugin() : - CMPluginBase(ICQ_PROTOCOL_NAME) - { - RegisterProtocol(PROTOTYPE_PROTOCOL, icqProtoInit, icqProtoUninit); - } -} - g_plugin; -- cgit v1.2.3