From 30ab6ceb71842f003f649b3d62b89af010cf40d1 Mon Sep 17 00:00:00 2001 From: George Hazan <george.hazan@gmail.com> Date: Wed, 20 Jun 2012 17:00:14 +0000 Subject: - direct call of MS_SKIN_ADDNEWSOUND replaced with Skin_AddSound() call; - obsolete structure SKINSOUNDDESC removed - dynamically translated hot keys; - checked correct LPGEN'ing of the sounds creation; - code cleaning git-svn-id: http://svn.miranda-ng.org/main/trunk@500 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/SecureIM/commonheaders.cpp | 2 +- plugins/SecureIM/crypt_check.cpp | 8 ++++---- plugins/SecureIM/crypt_icons.cpp | 10 +++++----- plugins/SecureIM/crypt_lists.cpp | 14 +++++++------- plugins/SecureIM/crypt_misc.cpp | 2 +- plugins/SecureIM/images.cpp | 2 +- plugins/SecureIM/main.cpp | 12 ++++++------ plugins/SecureIM/options.cpp | 24 ++++++++++++------------ plugins/SecureIM/rtfconv.cpp | 4 ++-- plugins/SecureIM/svcs_clist.cpp | 12 ++++++------ plugins/SecureIM/svcs_proto.cpp | 38 +++++++++++++++++++------------------- plugins/SecureIM/svcs_srmm.cpp | 4 ++-- 12 files changed, 66 insertions(+), 66 deletions(-) (limited to 'plugins/SecureIM') diff --git a/plugins/SecureIM/commonheaders.cpp b/plugins/SecureIM/commonheaders.cpp index 5d6d0657c0..3838adbc76 100644 --- a/plugins/SecureIM/commonheaders.cpp +++ b/plugins/SecureIM/commonheaders.cpp @@ -45,7 +45,7 @@ LPSTR myDBGetString(HANDLE hContact,const char *szModule,const char *szSetting) DBVARIANT dbv; dbv.type = DBVT_ASCIIZ; DBGetContactSetting(hContact,szModule,szSetting,&dbv); - if ( dbv.pszVal && (dbv.type==DBVT_ASCIIZ || dbv.type==DBVT_UTF8 || dbv.type==DBVT_WCHAR) ) + if ( dbv.pszVal && (dbv.type==DBVT_ASCIIZ || dbv.type==DBVT_UTF8 || dbv.type==DBVT_WCHAR)) val = mir_strdup(dbv.pszVal); DBFreeVariant(&dbv); return val; diff --git a/plugins/SecureIM/crypt_check.cpp b/plugins/SecureIM/crypt_check.cpp index dfa486d1de..3a4a0e0c30 100644 --- a/plugins/SecureIM/crypt_check.cpp +++ b/plugins/SecureIM/crypt_check.cpp @@ -25,7 +25,7 @@ BYTE isContactSecured(HANDLE hContact) { if (!clist_cnt) return 0; BYTE r=0; - if ( isProtoMetaContacts(hContact) ) + if ( isProtoMetaContacts(hContact)) hContact = getMostOnline(hContact); // ������� ���, ����� ������� ������ ��������� for(int j=0;j<clist_cnt;j++) { @@ -107,13 +107,13 @@ BOOL isProtoSmallPackets(HANDLE hContact) { BOOL isContactInvisible(HANDLE hContact) { - if ( !DBGetContactSettingByte(hContact,"CList","Hidden",0) ) { + if ( !DBGetContactSettingByte(hContact,"CList","Hidden",0)) { if ( !clist_cnt ) return false; for(int j=0;j<clist_cnt;j++) { if ( clist[j].hContact == hContact ) { if ( !clist[j].proto->inspecting ) return false; if ( clist[j].waitForExchange ) return false; - switch( (int)DBGetContactSettingWord(hContact,clist[j].proto->name,"ApparentMode",0) ) { + switch( (int)DBGetContactSettingWord(hContact,clist[j].proto->name,"ApparentMode",0)) { case 0: return (CallProtoService(clist[j].proto->name,PS_GETSTATUS,0,0)==ID_STATUS_INVISIBLE); case ID_STATUS_ONLINE: @@ -238,7 +238,7 @@ BOOL isSecureIM(pUinKey ptr, BOOL emptyMirverAsSecureIM) { if ( !ptr->proto->inspecting ) return false; BOOL isSecureIM = false; - if ( bNOL && DBGetContactSettingByte(ptr->hContact,"CList","NotOnList",0) ) { + if ( bNOL && DBGetContactSettingByte(ptr->hContact,"CList","NotOnList",0)) { return false; } LPSTR mirver = myDBGetString(ptr->hContact,ptr->proto->name,"MirVer"); diff --git a/plugins/SecureIM/crypt_icons.cpp b/plugins/SecureIM/crypt_icons.cpp index 5c3d21023d..6c5984c345 100644 --- a/plugins/SecureIM/crypt_icons.cpp +++ b/plugins/SecureIM/crypt_icons.cpp @@ -19,7 +19,7 @@ HICON mode2icon(int mode,int type) { if ( icons_cache ) { for(i=0;i<icons_cache;i++) { - if ( ICONS_CACHE[i].mode == ((type<<8) | mode) ) { + if ( ICONS_CACHE[i].mode == ((type<<8) | mode)) { return ICONS_CACHE[i].icon; } } @@ -59,7 +59,7 @@ IconExtraColumn mode2iec(int mode) { int m=mode&0x0f,s=(mode&SECURED)>>4; // ��������� �� ����� - ����� � ��������� - if ( mode==-1 || (!s && !bASI && m!=MODE_PGP && m!=MODE_GPG) ) { + if ( mode==-1 || (!s && !bASI && m!=MODE_PGP && m!=MODE_GPG)) { return g_IEC[0]; // ������ ������ ����� } @@ -93,7 +93,7 @@ void ShowStatusIcon(HANDLE hContact,int mode) { } } } - if ( ServiceExists(MS_MSG_MODIFYICON) ) { // �������� ������ � srmm + if ( ServiceExists(MS_MSG_MODIFYICON)) { // �������� ������ � srmm StatusIconData sid; memset(&sid,0,sizeof(sid)); sid.cbSize = sizeof(sid); @@ -101,7 +101,7 @@ void ShowStatusIcon(HANDLE hContact,int mode) { for(int i=MODE_NATIVE; i<MODE_CNT;i++) { sid.dwId = i; sid.flags = (mode&SECURED)?0:MBF_DISABLED; - if ( mode==-1 || (mode&0x0f)!=i || isChatRoom(hContact) ) + if ( mode==-1 || (mode&0x0f)!=i || isChatRoom(hContact)) sid.flags |= MBF_HIDDEN; // ��������� ��� �������� ������ CallService(MS_MSG_MODIFYICON, (WPARAM)hContact, (LPARAM)&sid); if ( hMC ) @@ -140,7 +140,7 @@ void RefreshContactListIcons(void) { } hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST, 0, 0); while (hContact) { // � ����� �������� ������ - if ( isSecureProtocol(hContact) ) + if ( isSecureProtocol(hContact)) ShowStatusIcon(hContact); hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM)hContact, 0); } diff --git a/plugins/SecureIM/crypt_lists.cpp b/plugins/SecureIM/crypt_lists.cpp index f71398e4b4..7b68fbd250 100644 --- a/plugins/SecureIM/crypt_lists.cpp +++ b/plugins/SecureIM/crypt_lists.cpp @@ -86,8 +86,8 @@ void MoveToFirstInFilterList(HANDLE hContact) { for(i=0;;i++) { mir_itoa(i,str,10); - if ( DBGetContactSettingString(hContact,"_Filter",str,&dbv) ) break; - if ( !strcmp(szModuleName,dbv.pszVal) ) { // ����� ��� ������ + if ( DBGetContactSettingString(hContact,"_Filter",str,&dbv)) break; + if ( !strcmp(szModuleName,dbv.pszVal)) { // ����� ��� ������ if ( i==0 ) return; DBGetContactSettingString(hContact,"_Filter","0",&dbv); DBWriteContactSettingString(hContact,"_Filter","0",szModuleName); @@ -108,8 +108,8 @@ void MoveToLastInFilterList(HANDLE hContact) { for(i=0;;i++) { mir_itoa(i,str,10); - if ( DBGetContactSettingString(hContact,"_Filter",str,&dbv) ) break; - if ( !strcmp(szModuleName,dbv.pszVal) ) { // ����� ��� ������ + if ( DBGetContactSettingString(hContact,"_Filter",str,&dbv)) break; + if ( !strcmp(szModuleName,dbv.pszVal)) { // ����� ��� ������ j=i; } mir_free(dbv.pszVal); @@ -133,7 +133,7 @@ pUinKey addContact(HANDLE hContact) { // LPSTR szProto = (LPSTR) CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0); pSupPro proto = getSupPro(hContact); if ( proto ) { - if ( !CallService(MS_PROTO_ISPROTOONCONTACT, (WPARAM)hContact, (LPARAM)szModuleName) ) + if ( !CallService(MS_PROTO_ISPROTOONCONTACT, (WPARAM)hContact, (LPARAM)szModuleName)) CallService(MS_PROTO_ADDTOCONTACT, (WPARAM)hContact, (LPARAM)szModuleName); MoveToLastInFilterList(hContact); for(j=0;j<clist_cnt;j++) { @@ -152,9 +152,9 @@ pUinKey addContact(HANDLE hContact) { clist[j].proto = proto; clist[j].mode = DBGetContactSettingByte(hContact, szModuleName, "mode", 99); if ( clist[j].mode == 99 ) { - if ( isContactPGP(hContact) ) clist[j].mode = MODE_PGP; + if ( isContactPGP(hContact)) clist[j].mode = MODE_PGP; else - if ( isContactGPG(hContact) ) clist[j].mode = MODE_GPG; + if ( isContactGPG(hContact)) clist[j].mode = MODE_GPG; else clist[j].mode = MODE_RSAAES; DBWriteContactSettingByte(hContact, szModuleName, "mode", clist[j].mode); diff --git a/plugins/SecureIM/crypt_misc.cpp b/plugins/SecureIM/crypt_misc.cpp index ee6d3a5910..7e0055913d 100644 --- a/plugins/SecureIM/crypt_misc.cpp +++ b/plugins/SecureIM/crypt_misc.cpp @@ -129,7 +129,7 @@ void waitForExchange(pUinKey ptr, int flag) { // ����᪠�� ���� HANDLE hEvent = CreateEvent( NULL, TRUE, FALSE, NULL ); unsigned int tID; - CloseHandle( (HANDLE) _beginthreadex(NULL, 0, sttWaitForExchange, new TWaitForExchange(hEvent,ptr->hContact), 0, &tID) ); + CloseHandle( (HANDLE) _beginthreadex(NULL, 0, sttWaitForExchange, new TWaitForExchange(hEvent,ptr->hContact), 0, &tID)); SetEvent( hEvent ); break; } diff --git a/plugins/SecureIM/images.cpp b/plugins/SecureIM/images.cpp index 7006d4dfa0..eb4c87dea1 100644 --- a/plugins/SecureIM/images.cpp +++ b/plugins/SecureIM/images.cpp @@ -214,7 +214,7 @@ BOOL MakeBitmap32(HBITMAP *hBitmap) } -#define GET_PIXEL(__P__, __X__, __Y__) ( __P__ + width * 4 * (__Y__) + 4 * (__X__) ) +#define GET_PIXEL(__P__, __X__, __Y__) ( __P__ + width * 4 * (__Y__) + 4 * (__X__)) BOOL MakeGrayscale(HBITMAP *hBitmap) { diff --git a/plugins/SecureIM/main.cpp b/plugins/SecureIM/main.cpp index 24950bbacf..de80e12cf0 100644 --- a/plugins/SecureIM/main.cpp +++ b/plugins/SecureIM/main.cpp @@ -130,7 +130,7 @@ int __cdecl Load(PLUGINLINK *link) { iCoreVersion = CallService(MS_SYSTEM_GETVERSION,0,0); // load crypo++ dll - if ( !loadlib() ) { + if ( !loadlib()) { msgbox1(0,sim107,szModuleName,MB_OK|MB_ICONSTOP); return 1; } @@ -242,10 +242,10 @@ int __cdecl onModulesLoaded(WPARAM wParam,LPARAM lParam) { if ( !rsa_4096 ) { unsigned int tID; - CloseHandle( (HANDLE) _beginthreadex(NULL, 0, sttGenerateRSA, NULL, 0, &tID) ); + CloseHandle( (HANDLE) _beginthreadex(NULL, 0, sttGenerateRSA, NULL, 0, &tID)); } - exp->rsa_set_timeout( DBGetContactSettingWord(0,szModuleName,"ket",10) ); + exp->rsa_set_timeout( DBGetContactSettingWord(0,szModuleName,"ket",10)); } #if defined(_DEBUG) || defined(NETLIB_LOG) @@ -361,8 +361,8 @@ int __cdecl onModulesLoaded(WPARAM wParam,LPARAM lParam) { loadContactList(); // add new skin sound - SkinAddNewSound("IncomingSecureMessage","Incoming Secure Message","Sounds\\iSecureMessage.wav"); - SkinAddNewSound("OutgoingSecureMessage","Outgoing Secure Message","Sounds\\oSecureMessage.wav"); + SkinAddNewSound("IncomingSecureMessage",LPGEN("Incoming Secure Message"),"Sounds\\iSecureMessage.wav"); + SkinAddNewSound("OutgoingSecureMessage",LPGEN("Outgoing Secure Message"),"Sounds\\oSecureMessage.wav"); #if defined(_DEBUG) || defined(NETLIB_LOG) Sent_NetLog("init extra icons"); @@ -383,7 +383,7 @@ int __cdecl onModulesLoaded(WPARAM wParam,LPARAM lParam) { AddHookFunction(ME_CLIST_PREBUILDCONTACTMENU, onRebuildContactMenu); // g_hMC = HookEvent(ME_MC_SUBCONTACTSCHANGED, onMC); - if ( ServiceExists(MS_EXTRAICON_REGISTER) ) { + if ( ServiceExists(MS_EXTRAICON_REGISTER)) { g_hCLIcon = ExtraIcon_Register(szModuleName, Translate("SecureIM status"), "sim_cm_est", onExtraImageListRebuilding, onExtraImageApplying); diff --git a/plugins/SecureIM/options.cpp b/plugins/SecureIM/options.cpp index a3513522e7..1925f19c09 100644 --- a/plugins/SecureIM/options.cpp +++ b/plugins/SecureIM/options.cpp @@ -368,7 +368,7 @@ INT_PTR CALLBACK DlgProcOptionsGeneral(HWND hDlg, UINT wMsg, WPARAM wParam, LPAR if ( ptr->keyLoaded ) { LPSTR buffer = (LPSTR) alloca(RSASIZE); exp->rsa_export_pubkey(ptr->cntx,buffer); - if ( !SaveExportRSAKeyDlg(hDlg,buffer,0) ) + if ( !SaveExportRSAKeyDlg(hDlg,buffer,0)) msgbox(hDlg,sim114,szModuleName,MB_OK|MB_ICONEXCLAMATION); } } @@ -382,8 +382,8 @@ INT_PTR CALLBACK DlgProcOptionsGeneral(HWND hDlg, UINT wMsg, WPARAM wParam, LPAR if(ptr) { createRSAcntx(ptr); LPSTR pub = (LPSTR) alloca(RSASIZE); - if ( !LoadImportRSAKeyDlg(hDlg,pub,0) ) return TRUE; - if ( exp->rsa_import_pubkey(ptr->cntx,pub) ) { + if ( !LoadImportRSAKeyDlg(hDlg,pub,0)) return TRUE; + if ( exp->rsa_import_pubkey(ptr->cntx,pub)) { int len; exp->rsa_get_pubkey(ptr->cntx,(PBYTE)pub,&len); @@ -519,11 +519,11 @@ INT_PTR CALLBACK DlgProcOptionsGeneral(HWND hDlg, UINT wMsg, WPARAM wParam, LPAR } CheckMenuItem(hMenu, ID_DISABLED+ptr->tstatus, MF_CHECKED ); if ( ptr->tmode==MODE_NATIVE ) { - if ( !hasKey(ptr) ) EnableMenuItem(hMenu, ID_DELPSK, MF_GRAYED ); + if ( !hasKey(ptr)) EnableMenuItem(hMenu, ID_DELPSK, MF_GRAYED ); } else if ( ptr->tmode==MODE_RSAAES ) { - if ( !hasKey(ptr) ) { + if ( !hasKey(ptr)) { EnableMenuItem(hMenu, ID_EXPPUBL, MF_GRAYED ); EnableMenuItem(hMenu, ID_DELPUBL, MF_GRAYED ); } @@ -607,7 +607,7 @@ INT_PTR CALLBACK DlgProcOptionsProto(HWND hDlg, UINT wMsg, WPARAM wParam, LPARAM case IDC_RSA_EXP: { LPSTR pub = (LPSTR) alloca(RSASIZE); exp->rsa_export_keypair(CPP_MODE_RSA,NULL,pub,NULL); - if ( !SaveExportRSAKeyDlg(hDlg,pub,0) ) + if ( !SaveExportRSAKeyDlg(hDlg,pub,0)) msgbox(hDlg,sim114,szModuleName,MB_OK|MB_ICONEXCLAMATION); return TRUE; } break; @@ -617,19 +617,19 @@ INT_PTR CALLBACK DlgProcOptionsProto(HWND hDlg, UINT wMsg, WPARAM wParam, LPARAM if ( res==IDOK ) { LPSTR priv = (LPSTR) alloca(RSASIZE); exp->rsa_export_keypair(CPP_MODE_RSA,priv,NULL,passphrase); - if ( !SaveExportRSAKeyDlg(hDlg,priv,1) ) + if ( !SaveExportRSAKeyDlg(hDlg,priv,1)) msgbox(hDlg,sim112,szModuleName,MB_OK|MB_ICONEXCLAMATION); } return TRUE; } break; case IDC_RSA_IMPPRIV: { LPSTR priv = (LPSTR) alloca(RSASIZE); - if ( !LoadImportRSAKeyDlg(hDlg,priv,1) ) return TRUE; + if ( !LoadImportRSAKeyDlg(hDlg,priv,1)) return TRUE; // LPSTR passphrase = (LPSTR) alloca(RSASIZE); int res = DialogBoxParam(g_hInst,MAKEINTRESOURCE(IDD_PASSPHRASE),NULL,(DLGPROC)DlgProcSetPassphrase,(LPARAM)passphrase); if ( res==IDOK ) { - if ( !exp->rsa_import_keypair(CPP_MODE_RSA,priv,passphrase) ) { + if ( !exp->rsa_import_keypair(CPP_MODE_RSA,priv,passphrase)) { msgbox(hDlg,sim113,szModuleName,MB_OK|MB_ICONEXCLAMATION); } else { @@ -1440,7 +1440,7 @@ void ApplyGeneralSettings(HWND hDlg) { GetDlgItemText(hDlg,IDC_KET,timeout,5); tmp = atoi(timeout); if(tmp > 65535) tmp = 65535; DBWriteContactSettingWord(0,szModuleName,"ket",tmp); - exp->rsa_set_timeout( DBGetContactSettingWord(0,szModuleName,"ket",10) ); + exp->rsa_set_timeout( DBGetContactSettingWord(0,szModuleName,"ket",10)); mir_itoa(tmp,timeout,10); SetDlgItemText(hDlg,IDC_KET,timeout); @@ -1496,7 +1496,7 @@ void ApplyGeneralSettings(HWND hDlg) { else DBWriteContactSettingByte(ptr->hContact, szModuleName, "StatusID", ptr->status); } if ( ptr->mode==MODE_NATIVE ) { - if ( getListViewPSK(hLV,i) ) { + if ( getListViewPSK(hLV,i)) { LPSTR tmp = myDBGetString(ptr->hContact,szModuleName,"tPSK"); DBWriteContactSettingString(ptr->hContact, szModuleName, "PSK", tmp); mir_free(tmp); @@ -1508,7 +1508,7 @@ void ApplyGeneralSettings(HWND hDlg) { } else if ( ptr->mode==MODE_RSAAES ) { - if ( !getListViewPUB(hLV,i) ) { + if ( !getListViewPUB(hLV,i)) { DBDeleteContactSetting(ptr->hContact, szModuleName, "rsa_pub"); } } diff --git a/plugins/SecureIM/rtfconv.cpp b/plugins/SecureIM/rtfconv.cpp index 271e62aa5b..994f541373 100644 --- a/plugins/SecureIM/rtfconv.cpp +++ b/plugins/SecureIM/rtfconv.cpp @@ -34,13 +34,13 @@ void free_rtfconv () { void rtfconvA(LPCSTR rtf, LPWSTR plain) { - pRtfconvString( rtf, plain, 0, 1200, CONVMODE_USE_SYSTEM_TABLE, (strlen(rtf)+1)*sizeof(WCHAR) ); + pRtfconvString( rtf, plain, 0, 1200, CONVMODE_USE_SYSTEM_TABLE, (strlen(rtf)+1)*sizeof(WCHAR)); } void rtfconvW(LPCWSTR rtf, LPWSTR plain) { - pRtfconvString( rtf, plain, 0, 1200, CONVMODE_USE_SYSTEM_TABLE, (wcslen(rtf)+1)*sizeof(WCHAR) ); + pRtfconvString( rtf, plain, 0, 1200, CONVMODE_USE_SYSTEM_TABLE, (wcslen(rtf)+1)*sizeof(WCHAR)); } // EOF diff --git a/plugins/SecureIM/svcs_clist.cpp b/plugins/SecureIM/svcs_clist.cpp index 359e273562..12402a58be 100644 --- a/plugins/SecureIM/svcs_clist.cpp +++ b/plugins/SecureIM/svcs_clist.cpp @@ -82,7 +82,7 @@ int __cdecl onExtraImageListRebuilding(WPARAM, LPARAM) { #if defined(_DEBUG) || defined(NETLIB_LOG) Sent_NetLog("onExtraImageListRebuilding"); #endif - if ( (bADV || g_hCLIcon) && ServiceExists(MS_CLIST_EXTRA_ADD_ICON) ) { + if ( (bADV || g_hCLIcon) && ServiceExists(MS_CLIST_EXTRA_ADD_ICON)) { RefreshContactListIcons(); } return 0; @@ -91,7 +91,7 @@ int __cdecl onExtraImageListRebuilding(WPARAM, LPARAM) { int __cdecl onExtraImageApplying(WPARAM wParam, LPARAM) { - if ( (bADV || g_hCLIcon) && ServiceExists(MS_CLIST_EXTRA_SET_ICON) && isSecureProtocol((HANDLE)wParam) ) { + if ( (bADV || g_hCLIcon) && ServiceExists(MS_CLIST_EXTRA_SET_ICON) && isSecureProtocol((HANDLE)wParam)) { IconExtraColumn iec = mode2iec(isContactSecured((HANDLE)wParam)); if ( g_hCLIcon ) { ExtraIcon_SetIcon(g_hCLIcon, (HANDLE)wParam, iec.hImage); @@ -152,7 +152,7 @@ int __cdecl onRebuildContactMenu(WPARAM wParam,LPARAM lParam) { } if ( isSecureProto && !isChat && isMiranda && - (ptr->mode==MODE_NATIVE || ptr->mode==MODE_RSAAES) ) { + (ptr->mode==MODE_NATIVE || ptr->mode==MODE_RSAAES)) { // Native/RSAAES mi.flags = CMIM_FLAGS | CMIF_NOTOFFLINE | CMIM_ICON; if ( !isSecured ) { @@ -167,7 +167,7 @@ int __cdecl onRebuildContactMenu(WPARAM wParam,LPARAM lParam) { } // set status menu if ( bSCM && !bMC && - ( !isSecured || ptr->mode==MODE_PGP || ptr->mode==MODE_GPG ) ) { + ( !isSecured || ptr->mode==MODE_PGP || ptr->mode==MODE_GPG )) { mi.flags = CMIM_FLAGS | CMIM_NAME | CMIM_ICON; mi.hIcon = g_hICO[ICO_ST_DIS+ptr->status]; @@ -182,7 +182,7 @@ int __cdecl onRebuildContactMenu(WPARAM wParam,LPARAM lParam) { } } else - if ( isSecureProto && !isChat && (ptr->mode==MODE_PGP || ptr->mode==MODE_GPG) ) { + if ( isSecureProto && !isChat && (ptr->mode==MODE_PGP || ptr->mode==MODE_GPG)) { // PGP, GPG if ( ptr->mode==MODE_PGP && bPGPloaded ) { if ((bPGPkeyrings || bPGPprivkey) && !isGPG) { @@ -200,7 +200,7 @@ int __cdecl onRebuildContactMenu(WPARAM wParam,LPARAM lParam) { if ( isSecureProto && !isChat && isMiranda ) { // set mode menu if ( bMCM && !bMC && - ( !isSecured || ptr->mode==MODE_PGP || ptr->mode==MODE_GPG ) ) { + ( !isSecured || ptr->mode==MODE_PGP || ptr->mode==MODE_GPG )) { mi.flags = CMIM_FLAGS | CMIM_NAME | CMIM_ICON; mi.hIcon = g_hICO[ICO_OV_NAT+ptr->mode]; diff --git a/plugins/SecureIM/svcs_proto.cpp b/plugins/SecureIM/svcs_proto.cpp index a69d7d720d..ef8d6c850c 100644 --- a/plugins/SecureIM/svcs_proto.cpp +++ b/plugins/SecureIM/svcs_proto.cpp @@ -25,7 +25,7 @@ int getSecureSig(LPCSTR szMsg, LPSTR *szPlainMsg=NULL) { int returnNoError(HANDLE hContact) { HANDLE hEvent = CreateEvent( NULL, TRUE, FALSE, NULL ); unsigned int tID; - CloseHandle( (HANDLE) _beginthreadex(NULL, 0, sttFakeAck, new TFakeAckParams(hEvent,hContact,777,0), 0, &tID) ); + CloseHandle( (HANDLE) _beginthreadex(NULL, 0, sttFakeAck, new TFakeAckParams(hEvent,hContact,777,0), 0, &tID)); SetEvent( hEvent ); return 777; } @@ -34,7 +34,7 @@ int returnNoError(HANDLE hContact) { int returnError(HANDLE hContact, LPCSTR err) { HANDLE hEvent = CreateEvent( NULL, TRUE, FALSE, NULL ); unsigned int tID; - CloseHandle( (HANDLE) _beginthreadex(NULL, 0, sttFakeAck, new TFakeAckParams(hEvent,hContact,666,err), 0, &tID) ); + CloseHandle( (HANDLE) _beginthreadex(NULL, 0, sttFakeAck, new TFakeAckParams(hEvent,hContact,666,err), 0, &tID)); SetEvent( hEvent ); return 666; } @@ -271,7 +271,7 @@ INT_PTR __cdecl onRecvMsg(WPARAM wParam, LPARAM lParam) { #if defined(_DEBUG) || defined(NETLIB_LOG) Sent_NetLog("onRecvMsg: Native SiG_ENON message"); #endif - if ( cpp_keyx(ptr->cntx) ) { + if ( cpp_keyx(ptr->cntx)) { // decrypting message szPlainMsg = decodeMsg(ptr,lParam,szEncMsg); if (!ptr->decoded) { @@ -392,7 +392,7 @@ INT_PTR __cdecl onRecvMsg(WPARAM wParam, LPARAM lParam) { // receive KeyB from user; showPopUpKR(ptr->hContact); - if ( ptr->cntx && cpp_keyb(ptr->cntx) ) { + if ( ptr->cntx && cpp_keyb(ptr->cntx)) { // reinit key exchange if an old key from user is found cpp_reset_context(ptr->cntx); } @@ -450,7 +450,7 @@ INT_PTR __cdecl onRecvMsg(WPARAM wParam, LPARAM lParam) { } // auto send my public key to keyB user if not done before - if ( !cpp_keya(ptr->cntx) ) { + if ( !cpp_keya(ptr->cntx)) { LPSTR keyToSend = InitKeyA(ptr,0); // calculate public and private key #if defined(_DEBUG) || defined(NETLIB_LOG) Sent_NetLog("onRecvMsg: Sending KEYA %s", keyToSend); @@ -534,7 +534,7 @@ INT_PTR __cdecl onRecvMsg(WPARAM wParam, LPARAM lParam) { /* common part (CalcKeyX & SendQueue) */ // calculate KeyX - if ( cpp_keya(ptr->cntx) && cpp_keyb(ptr->cntx) && !cpp_keyx(ptr->cntx) ) + if ( cpp_keya(ptr->cntx) && cpp_keyb(ptr->cntx) && !cpp_keyx(ptr->cntx)) CalculateKeyX(ptr,ptr->hContact); ShowStatusIconNotify(ptr->hContact); @@ -550,7 +550,7 @@ INT_PTR __cdecl onRecvMsg(WPARAM wParam, LPARAM lParam) { } //switch // receive message - if ( cpp_keyx(ptr->cntx) && (ssig==SiG_ENON||ssig==SiG_ENOF) ) { + if ( cpp_keyx(ptr->cntx) && (ssig==SiG_ENON||ssig==SiG_ENOF)) { #if defined(_DEBUG) || defined(NETLIB_LOG) Sent_NetLog("onRecvMsg: message received"); #endif @@ -571,7 +571,7 @@ INT_PTR __cdecl onSendMsgW(WPARAM wParam, LPARAM lParam) { if (!lParam) return 0; CCSDATA *ccs = (CCSDATA *) lParam; - if ( !(ccs->wParam & PREF_UTF) ) + if ( !(ccs->wParam & PREF_UTF)) ccs->wParam |= PREF_UNICODE; return onSendMsg(wParam, lParam); @@ -616,7 +616,7 @@ INT_PTR __cdecl onSendMsg(WPARAM wParam, LPARAM lParam) { Sent_NetLog("onSendMsg: PGP|GPG mode"); #endif // ���� ����� ����������� - ������� - if ( isContactPGP(ptr->hContact) || isContactGPG(ptr->hContact) ) { + if ( isContactPGP(ptr->hContact) || isContactGPG(ptr->hContact)) { /* if(stat==ID_STATUS_OFFLINE) { if (msgbox1(0,sim110,szModuleName,MB_YESNO|MB_ICONQUESTION)==IDNO) { @@ -681,7 +681,7 @@ INT_PTR __cdecl onSendMsg(WPARAM wParam, LPARAM lParam) { else { createRSAcntx(ptr); } - if ( !bSOM || (!isClientMiranda(ptr,1) && !isSecureIM(ptr,1)) || !loadRSAkey(ptr) ) { + if ( !bSOM || (!isClientMiranda(ptr,1) && !isSecureIM(ptr,1)) || !loadRSAkey(ptr)) { if ( ssig==SiG_NONE ) { // ������ ���� ��������������� � ������� return CallService(MS_PROTO_CHAINSEND, wParam, lParam); @@ -729,7 +729,7 @@ INT_PTR __cdecl onSendMsg(WPARAM wParam, LPARAM lParam) { return returnNoError(pccsd->hContact); } // ������ ��������� (��� �����, ��� ��������� � �������� AIP & NOL) - if ( ssig==SiG_NONE && isSecureIM(ptr->hContact) ) { + if ( ssig==SiG_NONE && isSecureIM(ptr->hContact)) { // ������� ��� � ������� addMsg2Queue(ptr, pccsd->wParam, (LPSTR)pccsd->lParam); // ��������� ������� ��������� ���������� @@ -789,7 +789,7 @@ INT_PTR __cdecl onSendMsg(WPARAM wParam, LPARAM lParam) { #if defined(_DEBUG) || defined(NETLIB_LOG) Sent_NetLog("onSendMsg: message for offline"); #endif - if ( ssig==SiG_INIT && cpp_keyx(ptr->cntx) ) { + if ( ssig==SiG_INIT && cpp_keyx(ptr->cntx)) { // reinit key exchange cpp_reset_context(ptr->cntx); } @@ -875,13 +875,13 @@ INT_PTR __cdecl onSendMsg(WPARAM wParam, LPARAM lParam) { return returnNoError(pccsd->hContact); } - if ( cpp_keya(ptr->cntx) && cpp_keyb(ptr->cntx) && !cpp_keyx(ptr->cntx) ) + if ( cpp_keya(ptr->cntx) && cpp_keyb(ptr->cntx) && !cpp_keyx(ptr->cntx)) CalculateKeyX(ptr,ptr->hContact); ShowStatusIconNotify(pccsd->hContact); // if cryptokey exist - if ( cpp_keyx(ptr->cntx) ) { + if ( cpp_keyx(ptr->cntx)) { #if defined(_DEBUG) || defined(NETLIB_LOG) Sent_NetLog("onSendMsg: cryptokey exist"); #endif @@ -1070,7 +1070,7 @@ int __cdecl onProtoAck(WPARAM wParam,LPARAM lParam) { if ( ptr->fileSend ) { char **file=ptr->fileSend; for(int j=0;file[j];j++) { - if ( strstr(file[j],".AESHELL") ) mir_unlink(file[j]); + if ( strstr(file[j],".AESHELL")) mir_unlink(file[j]); mir_free(file[j]); } SAFE_FREE(ptr->fileSend); @@ -1080,13 +1080,13 @@ int __cdecl onProtoAck(WPARAM wParam,LPARAM lParam) { case ACKRESULT_NEXTFILE: case ACKRESULT_SUCCESS: { if ( ptr->finFileRecv && ptr->lastFileRecv ) { - if ( strstr(ptr->lastFileRecv,".AESHELL") ) { + if ( strstr(ptr->lastFileRecv,".AESHELL")) { char buf[MAX_PATH]; LPSTR file_out=mir_strdup(ptr->lastFileRecv); LPSTR pos=strrchr(file_out,'.'); //find last . if (pos) *pos='\0'; //remove AESHELL from name - if ( isFileExist(file_out) ) { + if ( isFileExist(file_out)) { buf[0]='\0'; LPSTR p=strrchr(file_out,'.'); LPSTR x=strrchr(file_out,'\\'); @@ -1096,7 +1096,7 @@ int __cdecl onProtoAck(WPARAM wParam,LPARAM lParam) { } for(int i=1;i<10000;i++) { sprintf(pos," (%d)%s",i,buf); - if ( !isFileExist(file_out) ) break; + if ( !isFileExist(file_out)) break; } } @@ -1116,7 +1116,7 @@ int __cdecl onProtoAck(WPARAM wParam,LPARAM lParam) { ptr->finFileRecv = false; } if ( ptr->finFileSend && ptr->lastFileSend ) { - if ( strstr(ptr->lastFileSend,".AESHELL") ) mir_unlink(ptr->lastFileSend); + if ( strstr(ptr->lastFileSend,".AESHELL")) mir_unlink(ptr->lastFileSend); SAFE_FREE(ptr->lastFileSend); ptr->finFileSend = false; } diff --git a/plugins/SecureIM/svcs_srmm.cpp b/plugins/SecureIM/svcs_srmm.cpp index ea7b8be780..688246847e 100644 --- a/plugins/SecureIM/svcs_srmm.cpp +++ b/plugins/SecureIM/svcs_srmm.cpp @@ -13,12 +13,12 @@ int __cdecl onWindowEvent(WPARAM wParam, LPARAM lParam) { int __cdecl onIconPressed(WPARAM wParam, LPARAM lParam) { HANDLE hContact = (HANDLE)wParam; - if ( isProtoMetaContacts(hContact) ) + if ( isProtoMetaContacts(hContact)) hContact = getMostOnline(hContact); // ������� ���, ����� ������� ������ ��������� StatusIconClickData *sicd = (StatusIconClickData *)lParam; if ( strcmp(sicd->szModule, szModuleName) != 0 || - !isSecureProtocol(hContact) ) return 0; // not our event + !isSecureProtocol(hContact)) return 0; // not our event BOOL isPGP = isContactPGP(hContact); BOOL isGPG = isContactGPG(hContact); -- cgit v1.2.3