From 5e9e63c45e37917ffb0acd83832d0d8f99d01883 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 28 Nov 2012 17:38:49 +0000 Subject: new macroses for MS_PROTO_CHAINRECV: ProtoChainRecv, ProtoChainRecvMsg & ProtoChainRecvFile git-svn-id: http://svn.miranda-ng.org/main/trunk@2540 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/AimOscar/src/avatars.cpp | 6 +- protocols/AimOscar/src/client.cpp | 4 +- protocols/AimOscar/src/connection.cpp | 72 ++++---- protocols/AimOscar/src/conv.cpp | 56 +++--- protocols/AimOscar/src/flap.cpp | 6 +- protocols/AimOscar/src/proto.cpp | 8 +- protocols/AimOscar/src/server.cpp | 336 ++++++++++++++-------------------- protocols/AimOscar/src/snac.cpp | 4 +- protocols/AimOscar/src/tlv.cpp | 2 +- protocols/AimOscar/src/ui.cpp | 42 ++--- protocols/AimOscar/src/utility.cpp | 4 +- 11 files changed, 240 insertions(+), 300 deletions(-) (limited to 'protocols/AimOscar') diff --git a/protocols/AimOscar/src/avatars.cpp b/protocols/AimOscar/src/avatars.cpp index 4c7de35f18..769c940cea 100644 --- a/protocols/AimOscar/src/avatars.cpp +++ b/protocols/AimOscar/src/avatars.cpp @@ -131,17 +131,17 @@ void CAimProto::avatar_retrieval_handler(const char* sn, const char* hash, const int detect_image_type(const char* stream, const TCHAR* &type_ret) { - if(stream[0]=='G'&&stream[1]=='I'&&stream[2]=='F') + if (stream[0]=='G'&&stream[1]=='I'&&stream[2]=='F') { type_ret = _T(".gif"); return PA_FORMAT_GIF; } - else if(stream[1]=='P'&&stream[2]=='N'&&stream[3]=='G') + else if (stream[1]=='P'&&stream[2]=='N'&&stream[3]=='G') { type_ret = _T(".png"); return PA_FORMAT_PNG; } - else if(stream[0]=='B'&&stream[1]=='M') + else if (stream[0]=='B'&&stream[1]=='M') { type_ret = _T(".bmp"); return PA_FORMAT_BMP; diff --git a/protocols/AimOscar/src/client.cpp b/protocols/AimOscar/src/client.cpp index 5c4421ac11..37fe6c2734 100644 --- a/protocols/AimOscar/src/client.cpp +++ b/protocols/AimOscar/src/client.cpp @@ -223,7 +223,7 @@ int CAimProto::aim_set_caps(HANDLE hServerConn,unsigned short &seqno) // memcpy(&temp[AIM_CAPS_LENGTH*i++],AIM_CAP_ICQ_SERVER_RELAY,AIM_CAPS_LENGTH); memcpy(&temp[AIM_CAPS_LENGTH*i++],AIM_CAP_UTF8,AIM_CAPS_LENGTH); memcpy(&temp[AIM_CAPS_LENGTH*i++],AIM_CAP_MIRANDA,AIM_CAPS_LENGTH); - if(getByte(AIM_KEY_HF, 0)) + if (getByte(AIM_KEY_HF, 0)) memcpy(&temp[AIM_CAPS_LENGTH*i++],AIM_CAP_HIPTOP,AIM_CAPS_LENGTH); aim_writesnac(0x02,0x04,offset,buf); aim_writetlv(0x05,(unsigned short)(AIM_CAPS_LENGTH*i),temp,offset,buf); @@ -370,7 +370,7 @@ int CAimProto::aim_send_message(HANDLE hServerConn,unsigned short &seqno,const c if (!blast) { - if(auto_response) + if (auto_response) aim_writetlv(0x04,0,0,offset,buf); // auto-response message else { diff --git a/protocols/AimOscar/src/connection.cpp b/protocols/AimOscar/src/connection.cpp index 81548f875b..3b98a8ae7c 100644 --- a/protocols/AimOscar/src/connection.cpp +++ b/protocols/AimOscar/src/connection.cpp @@ -131,10 +131,10 @@ void CAimProto::aim_connection_authorization(void) if (aim_send_connection_packet(hServerConn, seqno,flap.val())==0)//cookie challenge aim_authkey_request(hServerConn, seqno);//md5 authkey request } - else if(flap.cmp(0x02)) + else if (flap.cmp(0x02)) { SNAC snac(flap.val(),flap.snaclen()); - if(snac.cmp(0x0017)) + if (snac.cmp(0x0017)) { snac_md5_authkey(snac,hServerConn,seqno, username, password); int authres = snac_authorization_reply(snac); @@ -156,7 +156,7 @@ void CAimProto::aim_connection_authorization(void) } } } - else if(flap.cmp(0x04)) + else if (flap.cmp(0x04)) { LOG("Connection Authorization Thread Ending: Flap 0x04"); goto exit; @@ -201,7 +201,7 @@ void __cdecl CAimProto::aim_protocol_negotiation( void* ) break; } } - else if(recvResult>0) + else if (recvResult>0) { unsigned short flap_length=0; for (;packetRecv.bytesUsed0) + if (recvResult>0) { unsigned short flap_length=0; for (;packetRecv.bytesUsed0) + if (recvResult>0) { unsigned short flap_length=0; for (;packetRecv.bytesUsed0) + if (recvResult>0) { unsigned short flap_length=0; for (;packetRecv.bytesUsedhconn,item->seqno,item->CHAT_COOKIE_LENGTH,item->CHAT_COOKIE);//cookie challenge mir_free(item->CHAT_COOKIE); item->CHAT_COOKIE=NULL; item->CHAT_COOKIE_LENGTH=0; } - else if(flap.cmp(0x02)) + else if (flap.cmp(0x02)) { SNAC snac(flap.val(),flap.snaclen()); - if(snac.cmp(0x0001)) + if (snac.cmp(0x0001)) { snac_supported_families(snac,item->hconn,item->seqno); snac_supported_family_versions(snac,item->hconn,item->seqno); @@ -553,14 +553,14 @@ void __cdecl CAimProto::aim_chat_negotiation( void* param ) snac_error(snac); } - if(snac.cmp(0x000E)) + if (snac.cmp(0x000E)) { snac_chat_received_message(snac, item); snac_chat_joined_left_users(snac, item); snac_error(snac); } } - else if(flap.cmp(0x04)) + else if (flap.cmp(0x04)) goto exit; } } @@ -590,7 +590,7 @@ void __cdecl CAimProto::aim_admin_negotiation( void* ) if (recvResult == SOCKET_ERROR) break; - if(recvResult>0) + if (recvResult>0) { unsigned short flap_length=0; for (;packetRecv.bytesUsed'); strip_tag(sub_begin,sub_end); @@ -630,69 +630,69 @@ char* rtf_to_html(HWND hwndDlg,int DlgItem) COLORREF isColor=cfOld.crTextColor; COLORREF isBackColor=cfOld.crBackColor; int isSize; - if(cfOld.yHeight==38*20) + if (cfOld.yHeight==38*20) isSize=7; - else if(cfOld.yHeight==24*20) + else if (cfOld.yHeight==24*20) isSize=6; - else if(cfOld.yHeight==18*20) + else if (cfOld.yHeight==18*20) isSize=5; - else if(cfOld.yHeight==14*20) + else if (cfOld.yHeight==14*20) isSize=4; - else if(cfOld.yHeight==12*20) + else if (cfOld.yHeight==12*20) isSize=3; - else if(cfOld.yHeight==10*20) + else if (cfOld.yHeight==10*20) isSize=2; - else if(cfOld.yHeight==8*20) + else if (cfOld.yHeight==8*20) isSize=1; else isSize=3; TCHAR text[3] =_T(""); SendDlgItemMessage(hwndDlg, DlgItem, EM_GETSELTEXT, 0, (LPARAM)&text); - if(Bold!=isBold) + if (Bold!=isBold) { Bold=isBold; - if(isBold) + if (isBold) { strcpy(&buf[pos],""); pos+=3; } else { - if(start!=0) + if (start!=0) { strcpy(&buf[pos],""); pos+=4; } } } - if(Italic!=isItalic) + if (Italic!=isItalic) { Italic=isItalic; - if(isItalic) + if (isItalic) { strcpy(&buf[pos],""); pos+=3; } else { - if(start!=0) + if (start!=0) { strcpy(&buf[pos],""); pos+=4; } } } - if(Underline!=isUnderline) + if (Underline!=isUnderline) { Underline=isUnderline; - if(isUnderline) + if (isUnderline) { strcpy(&buf[pos],""); pos+=3; } else { - if(start!=0) + if (start!=0) { strcpy(&buf[pos],""); pos+=4; @@ -705,7 +705,7 @@ char* rtf_to_html(HWND hwndDlg,int DlgItem) Color=isColor; BackColor=isBackColor; strcpy(Face,cfOld.szFaceName); - if(start!=0) + if (start!=0) { strcpy(&buf[pos],""); pos+=7; @@ -725,7 +725,7 @@ char* rtf_to_html(HWND hwndDlg,int DlgItem) char chBackColor[7]; _itoa((_htonl(BackColor)>>8),chBackColor,16); size_t len=strlen(chBackColor); - if(len<6) + if (len<6) { memmove(chBackColor+(6-len),chBackColor,len+1); for(int i=0;i<6;i++) @@ -741,7 +741,7 @@ char* rtf_to_html(HWND hwndDlg,int DlgItem) char chColor[7]; _itoa((_htonl(Color)>>8),chColor,16); size_t len=strlen(chColor); - if(len<6) + if (len<6) { memmove(chColor+(6-len),chColor,len+1); for(int i=0;i<6;i++) @@ -760,7 +760,7 @@ char* rtf_to_html(HWND hwndDlg,int DlgItem) strcpy(&buf[pos],">"); pos++; } - if(text[0]=='\r') + if (text[0]=='\r') { strcpy(&buf[pos],"
"); pos+=4; @@ -775,17 +775,17 @@ char* rtf_to_html(HWND hwndDlg,int DlgItem) start++; end++; } - if(Bold) + if (Bold) { strcpy(&buf[pos],""); pos+=4; } - if(Italic) + if (Italic) { strcpy(&buf[pos],""); pos+=4; } - if(Underline) + if (Underline) { strcpy(&buf[pos],""); pos+=4; diff --git a/protocols/AimOscar/src/flap.cpp b/protocols/AimOscar/src/flap.cpp index f652aff710..8b9e08b372 100644 --- a/protocols/AimOscar/src/flap.cpp +++ b/protocols/AimOscar/src/flap.cpp @@ -21,14 +21,14 @@ along with this program. If not, see . FLAP::FLAP(char* buf,int num_bytes) { - if(FLAP_SIZE>num_bytes) + if (FLAP_SIZE>num_bytes) { length_=0; } else { length_=_htons((*(unsigned short*)&buf[4])); - if(FLAP_SIZE+length_>num_bytes) + if (FLAP_SIZE+length_>num_bytes) { length_=0; } @@ -49,7 +49,7 @@ unsigned short FLAP::snaclen() } int FLAP::cmp(unsigned short type) { - if(type_==type) + if (type_==type) return 1; else return 0; diff --git a/protocols/AimOscar/src/proto.cpp b/protocols/AimOscar/src/proto.cpp index 17c8fc3a88..4b770d1fdf 100644 --- a/protocols/AimOscar/src/proto.cpp +++ b/protocols/AimOscar/src/proto.cpp @@ -81,13 +81,13 @@ CAimProto::~CAimProto() RemoveMainMenus(); RemoveContactMenus(); - if(hServerConn) + if (hServerConn) Netlib_CloseHandle(hServerConn); - if(hAvatarConn && hAvatarConn != (HANDLE)1) + if (hAvatarConn && hAvatarConn != (HANDLE)1) Netlib_CloseHandle(hAvatarConn); - if(hChatNavConn && hChatNavConn != (HANDLE)1) + if (hChatNavConn && hChatNavConn != (HANDLE)1) Netlib_CloseHandle(hChatNavConn); - if(hAdminConn && hAdminConn != (HANDLE)1) + if (hAdminConn && hAdminConn != (HANDLE)1) Netlib_CloseHandle(hAdminConn); close_chat_conn(); diff --git a/protocols/AimOscar/src/server.cpp b/protocols/AimOscar/src/server.cpp index a968c20bd5..9df0f81c7f 100644 --- a/protocols/AimOscar/src/server.cpp +++ b/protocols/AimOscar/src/server.cpp @@ -268,19 +268,19 @@ void CAimProto::snac_user_online(SNAC &snac)//family 0x0003 else deleteSetting(hContact, "Transport" ); - if(admin_aol) + if (admin_aol) { setByte(hContact, AIM_KEY_AC, ACCOUNT_TYPE_ADMIN); } - else if(aol) + else if (aol) { setByte(hContact, AIM_KEY_AC, ACCOUNT_TYPE_AOL); } - else if(icq) + else if (icq) { setByte(hContact, AIM_KEY_AC, ACCOUNT_TYPE_ICQ); } - else if(unconfirmed) + else if (unconfirmed) { setByte(hContact, AIM_KEY_AC, ACCOUNT_TYPE_UNCONFIRMED); } @@ -289,17 +289,17 @@ void CAimProto::snac_user_online(SNAC &snac)//family 0x0003 setByte(hContact, AIM_KEY_AC, ACCOUNT_TYPE_CONFIRMED); } - if(bot) + if (bot) { strcpy(client,CLIENT_BOT); bot_user=1; } - if(wireless) + if (wireless) { strcpy(client,CLIENT_SMS); wireless_user=1; } - else if(away) + else if (away) { away_user=1; } @@ -407,93 +407,93 @@ void CAimProto::snac_user_online(SNAC &snac)//family 0x0003 for(int i=0;i=snac.len()) break; } - while (offset")) - { + if (strstr(msg_buf, "")) { char* beg = strstr(msg_buf, ""); char* end = strstr(msg_buf, ""); - if (beg && end && beg < end) - { + if (beg && end && beg < end) { beg += 6; end[0] = 0; memmove(msg_buf, beg, end - beg + 1); } - else - descr_included = false; + else descr_included = false; } } - else if(tlv.cmp(0x000d)) - { + else if (tlv.cmp(0x000d)) { char* enc = tlv.dup(); unicode_descr = strcmp(enc, "unicode-2-0") == 0; mir_free(enc); @@ -1291,47 +1261,29 @@ void CAimProto::snac_received_message(SNAC &snac,HANDLE hServerConn,unsigned sho i += TLV_HEADER_SIZE + tlv.len(); } } - else if (cap_cmp(snac.val(offset+10), AIM_CAP_RTCAUDIO) == 0 || - cap_cmp(snac.val(offset+10), AIM_CAP_RTCVIDEO) == 0) - { - for (int i = 26; i < tlv.len(); ) - { + else if (cap_cmp(snac.val(offset+10), AIM_CAP_RTCAUDIO) == 0 || cap_cmp(snac.val(offset+10), AIM_CAP_RTCVIDEO) == 0) { + for (int i = 26; i < tlv.len(); ) { TLV tlv(snac.val(offset+i)); if (tlv.cmp(0x000A)) - { request_num=tlv.ushort();//for file transfer - } - else if(tlv.cmp(0x0002))//proxy ip - { + else if (tlv.cmp(0x0002))//proxy ip proxy_ip = tlv.ulong(); - } - else if(tlv.cmp(0x0003))//client ip - { + else if (tlv.cmp(0x0003))//client ip local_ip = tlv.ulong(); - } - else if(tlv.cmp(0x0004))//verified ip - { + else if (tlv.cmp(0x0004))//verified ip verified_ip = tlv.ulong(); - } - else if(tlv.cmp(0x0005)) - { + else if (tlv.cmp(0x0005)) port=tlv.ushort(); - } } channel = 0; break; } - else if (cap_cmp(snac.val(offset+10), AIM_CAP_CHAT) == 0)//it's a chat invite request - { - for(int i=26;i 0) + if (length_ > 0) { value_ = (char*)mir_alloc(length_+1); memcpy(value_, value, length_); diff --git a/protocols/AimOscar/src/ui.cpp b/protocols/AimOscar/src/ui.cpp index 76b50b9741..6e3f439f35 100644 --- a/protocols/AimOscar/src/ui.cpp +++ b/protocols/AimOscar/src/ui.cpp @@ -41,9 +41,9 @@ void DrawMyControl(HDC hDC, HWND /*hwndButton*/, HANDLE hTheme, UINT iState, REC if (hTheme) { DWORD state = (bIsPressed)?PBS_PRESSED:PBS_NORMAL; - if(state == PBS_NORMAL) + if (state == PBS_NORMAL) { - if(bIsFocused) + if (bIsFocused) state = PBS_DEFAULTED; } rect.top-=1; @@ -137,22 +137,22 @@ static INT_PTR CALLBACK userinfo_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, L #define MIN_WIDTH 400 if (WMSZ_RIGHT==wParam||WMSZ_TOPRIGHT==wParam||WMSZ_BOTTOMRIGHT==wParam) { - if(rect->right-rect->leftright-rect->leftright=rect->left+MIN_WIDTH; } if (WMSZ_LEFT==wParam||WMSZ_TOPLEFT==wParam||WMSZ_BOTTOMLEFT==wParam) { - if(rect->right-rect->leftright-rect->leftleft=rect->right-MIN_WIDTH; } if (WMSZ_TOP==wParam||WMSZ_TOPRIGHT==wParam||WMSZ_TOPLEFT==wParam) { - if(rect->bottom-rect->topbottom-rect->toptop=rect->bottom-MIN_HEIGHT; } if (WMSZ_BOTTOM==wParam||WMSZ_BOTTOMLEFT==wParam||WMSZ_BOTTOMRIGHT==wParam) { - if(rect->bottom-rect->topbottom-rect->topbottom=rect->top+MIN_HEIGHT; } break; @@ -233,7 +233,7 @@ static INT_PTR CALLBACK userinfo_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, L cfOld.dwMask = CFM_SUPERSCRIPT; SendDlgItemMessage(hwndDlg, IDC_PROFILE, EM_GETCHARFORMAT, SCF_SELECTION, (LPARAM)&cfOld); BOOL isSuper = (cfOld.dwEffects & CFE_SUPERSCRIPT) && (cfOld.dwMask & CFM_SUPERSCRIPT); - if(isSuper) + if (isSuper) { DrawMyControl(lpDIS->hDC,GetDlgItem(hwndDlg, IDC_BOLD),hThemeButton,lpDIS->itemState|ODS_SELECTED, lpDIS->rcItem); DrawIconEx(lpDIS->hDC, 4, 5, LoadIconEx("sup_scrpt"), 16, 16, 0, 0, DI_NORMAL); @@ -274,7 +274,7 @@ static INT_PTR CALLBACK userinfo_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, L cfOld.dwMask = CFM_SUBSCRIPT; SendDlgItemMessage(hwndDlg, IDC_PROFILE, EM_GETCHARFORMAT, SCF_SELECTION, (LPARAM)&cfOld); BOOL isSub = (cfOld.dwEffects & CFE_SUBSCRIPT) && (cfOld.dwMask & CFM_SUBSCRIPT); - if(isSub) + if (isSub) { DrawMyControl(lpDIS->hDC,GetDlgItem(hwndDlg, IDC_BOLD),hThemeButton,lpDIS->itemState|ODS_SELECTED, lpDIS->rcItem); DrawIconEx(lpDIS->hDC, 4, 5, LoadIconEx("sub_scrpt"), 16, 16, 0, 0, DI_NORMAL); @@ -307,7 +307,7 @@ static INT_PTR CALLBACK userinfo_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, L ReleaseIconEx("bold"); } } - else if(lpDIS->CtlID == IDC_ITALIC) + else if (lpDIS->CtlID == IDC_ITALIC) { CHARFORMAT2 cfOld; cfOld.cbSize = sizeof(CHARFORMAT2); @@ -521,7 +521,7 @@ static INT_PTR CALLBACK userinfo_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, L break; case IDC_UNDERLINE: - if(HIWORD(wParam)==BN_CLICKED) + if (HIWORD(wParam)==BN_CLICKED) { CHARFORMAT2 cfOld; cfOld.cbSize = sizeof(CHARFORMAT2); @@ -563,7 +563,7 @@ static INT_PTR CALLBACK userinfo_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, L cc.hInstance=(HWND)GetModuleHandle(NULL); cc.lpCustColors=custColours; cc.Flags=CC_ANYCOLOR|CC_FULLOPEN|CC_RGBINIT; - if(ChooseColor(&cc)) + if (ChooseColor(&cc)) { foreground=cc.rgbResult; InvalidateRect(GetDlgItem(hwndDlg, IDC_FOREGROUNDCOLOR), NULL, FALSE); @@ -586,7 +586,7 @@ static INT_PTR CALLBACK userinfo_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, L break; case IDC_BACKGROUNDCOLORPICKER: - if(HIWORD(wParam)==BN_CLICKED) + if (HIWORD(wParam)==BN_CLICKED) { CHOOSECOLOR cc={0}; custColours[0]=foreground; @@ -596,7 +596,7 @@ static INT_PTR CALLBACK userinfo_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, L cc.hInstance=(HWND)GetModuleHandle(NULL); cc.lpCustColors=custColours; cc.Flags=CC_ANYCOLOR|CC_FULLOPEN|CC_RGBINIT; - if(ChooseColor(&cc)) + if (ChooseColor(&cc)) { background=cc.rgbResult; InvalidateRect(GetDlgItem(hwndDlg, IDC_BACKGROUNDCOLOR), NULL, FALSE); @@ -878,14 +878,14 @@ static INT_PTR CALLBACK options_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, LP char str[128]; //SN GetDlgItemTextA(hwndDlg, IDC_SN, str, sizeof(str)); - if(strlen(str)>0) + if (strlen(str)>0) ppro->setString(AIM_KEY_SN, str); else ppro->deleteSetting(NULL, AIM_KEY_SN); //END SN //NK - if(GetDlgItemTextA(hwndDlg, IDC_NK, str, sizeof(str))) + if (GetDlgItemTextA(hwndDlg, IDC_NK, str, sizeof(str))) ppro->setString(AIM_KEY_NK, str); else { @@ -896,7 +896,7 @@ static INT_PTR CALLBACK options_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, LP //PW GetDlgItemTextA(hwndDlg, IDC_PW, str, sizeof(str)); - if(strlen(str)>0) + if (strlen(str)>0) { CallService(MS_DB_CRYPT_ENCODESTRING, sizeof(str), (LPARAM) str); ppro->setString(AIM_KEY_PW, str); @@ -907,7 +907,7 @@ static INT_PTR CALLBACK options_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, LP //HN GetDlgItemTextA(hwndDlg, IDC_HN, str, sizeof(str)); - if(strlen(str)>0 && strcmp(str, AIM_DEFAULT_SERVER)) + if (strlen(str)>0 && strcmp(str, AIM_DEFAULT_SERVER)) ppro->setString(AIM_KEY_HN, str); else ppro->deleteSetting(NULL, AIM_KEY_HN); @@ -935,7 +935,7 @@ static INT_PTR CALLBACK options_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, LP //PN int port = GetDlgItemInt(hwndDlg, IDC_PN, NULL, FALSE); - if(port > 0 && port != ppro->getByte(AIM_KEY_DSSL, 0) ? AIM_DEFAULT_PORT : AIM_DEFAULT_SSL_PORT) + if (port > 0 && port != ppro->getByte(AIM_KEY_DSSL, 0) ? AIM_DEFAULT_PORT : AIM_DEFAULT_SSL_PORT) ppro->setWord(AIM_KEY_PN, (WORD)port); else ppro->deleteSetting(NULL, AIM_KEY_PN); @@ -952,7 +952,7 @@ static INT_PTR CALLBACK options_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, LP else { int acc_disabled = ppro->getByte(AIM_KEY_AT, 0); - if(acc_disabled) + if (acc_disabled) add_AT_icons(ppro); ppro->setByte(AIM_KEY_AT, 0); } @@ -969,7 +969,7 @@ static INT_PTR CALLBACK options_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, LP { int es_disabled = ppro->getByte(AIM_KEY_ES, 0); ppro->setByte(AIM_KEY_ES, 0); - if(es_disabled) + if (es_disabled) add_ES_icons(ppro); } //End @@ -985,7 +985,7 @@ static INT_PTR CALLBACK options_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, LP else { int hf = ppro->getByte(AIM_KEY_HF, 0); - if(hf) + if (hf) ShowWindow(GetDlgItem(hwndDlg, IDC_MASQ), SW_SHOW); ppro->setByte(AIM_KEY_HF, 0); } diff --git a/protocols/AimOscar/src/utility.cpp b/protocols/AimOscar/src/utility.cpp index 15359a9a9b..4617fb7875 100644 --- a/protocols/AimOscar/src/utility.cpp +++ b/protocols/AimOscar/src/utility.cpp @@ -90,7 +90,7 @@ void CAimProto::start_connection(void *arg) { int status = (int)arg; - if(m_iStatus<=ID_STATUS_OFFLINE) + if (m_iStatus<=ID_STATUS_OFFLINE) { offline_contacts(); DBVARIANT dbv; @@ -325,7 +325,7 @@ void CAimProto::add_contact_to_group(HANDLE hContact, const char* new_group) void CAimProto::offline_contact(HANDLE hContact, bool remove_settings) { - if(remove_settings) + if (remove_settings) { //We need some of this stuff if we are still online. for(int i=1;;++i) -- cgit v1.2.3