From 353c79463614e291eb37e629e8b0d1cb9c58d8e8 Mon Sep 17 00:00:00 2001 From: Gluzskiy Alexandr Date: Tue, 28 Sep 2010 18:15:02 +0300 Subject: code cleanup --- init.cpp | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) (limited to 'init.cpp') diff --git a/init.cpp b/init.cpp index 0bffe53..6a104ce 100644 --- a/init.cpp +++ b/init.cpp @@ -17,8 +17,7 @@ #include "commonheaders.h" //global variables -bool bAppendTags = false, bDebugLog = false, bJabberAPI = false, bIsMiranda09 = false, bMetaContacts = false, bFileTransfers = false; -TCHAR *inopentag = NULL, *inclosetag = NULL, *outopentag = NULL, *outclosetag = NULL, *password = NULL; +bool bMetaContacts = false; HINSTANCE hInst; PLUGINLINK *pluginLink; @@ -93,15 +92,12 @@ int AddContact(WPARAM w, LPARAM l) static int OnModulesLoaded(WPARAM wParam,LPARAM lParam) { - int RecvMsgSvc(WPARAM w, LPARAM l); int SendMsgSvc(WPARAM w, LPARAM l); - int HookSendMsg(WPARAM w, LPARAM l); int ReplacerOptInit(WPARAM wParam,LPARAM lParam); bMetaContacts = ServiceExists(MS_MC_GETMETACONTACT); HookEvent(ME_OPT_INITIALISE, ReplacerOptInit); - HookEvent(ME_DB_EVENT_FILTER_ADD, HookSendMsg); PROTOCOLDESCRIPTOR pd = {0}; pd.cbSize=sizeof(PROTOCOLDESCRIPTOR); @@ -109,9 +105,7 @@ static int OnModulesLoaded(WPARAM wParam,LPARAM lParam) pd.type=PROTOTYPE_ENCRYPTION; CallService(MS_PROTO_REGISTERMODULE,0,(LPARAM)&pd); - CreateProtoServiceFunction(szReplacerModuleName,PSR_MESSAGE,RecvMsgSvc); CreateProtoServiceFunction(szReplacerModuleName,PSS_MESSAGE,SendMsgSvc); - CreateProtoServiceFunction(szReplacerModuleName,PSR_MESSAGE"W",RecvMsgSvc); CreateProtoServiceFunction(szReplacerModuleName,PSS_MESSAGE"W",SendMsgSvc); for (HANDLE hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST, 0, 0); hContact; hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM)hContact, 0)) @@ -128,13 +122,5 @@ static int OnModulesLoaded(WPARAM wParam,LPARAM lParam) extern "C" int __declspec(dllexport) Unload(void) { - for (HANDLE hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST, 0, 0); hContact; hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM)hContact, 0)) - DBDeleteContactSetting(hContact, szReplacerModuleName, "KeyID_Prescense"); - mir_free(inopentag); - mir_free(inclosetag); - mir_free(outopentag); - mir_free(outclosetag); - if(password) - delete [] password; return 0; } -- cgit v1.2.3