diff options
author | Gluzskiy Alexandr <sss123next@list.ru> | 2010-09-28 18:15:02 +0300 |
---|---|---|
committer | Gluzskiy Alexandr <sss123next@list.ru> | 2010-09-28 18:15:02 +0300 |
commit | 353c79463614e291eb37e629e8b0d1cb9c58d8e8 (patch) | |
tree | c4a3a921bf8f0411933485d8c7fde446b1b8d305 /init.cpp | |
parent | 4f8f8d3b1691decd02ba93ca7799c46cff1c4f9b (diff) |
code cleanup
Diffstat (limited to 'init.cpp')
-rw-r--r-- | init.cpp | 16 |
1 files changed, 1 insertions, 15 deletions
@@ -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; } |