diff options
author | George Hazan <george.hazan@gmail.com> | 2013-07-20 13:23:20 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-07-20 13:23:20 +0000 |
commit | d7382326906b9f3bdd66704dd1b41f9299c1daa6 (patch) | |
tree | ccc0696d8ec511b4894cf2b20971b9f7fc625689 /protocols | |
parent | 874cdbe42cfe376f0e72fd5fe6bad0d2f75f4ee3 (diff) |
protocol helper for detecting chats: isChatRoom
git-svn-id: http://svn.miranda-ng.org/main/trunk@5428 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols')
32 files changed, 180 insertions, 200 deletions
diff --git a/protocols/AimOscar/src/theme.cpp b/protocols/AimOscar/src/theme.cpp index 02e1f652bd..495ac46299 100644 --- a/protocols/AimOscar/src/theme.cpp +++ b/protocols/AimOscar/src/theme.cpp @@ -122,7 +122,7 @@ static const char* extra_ES_icon_name[2] = static void set_AT_icon(CAimProto* ppro, HANDLE hContact)
{
- if (ppro->getByte(hContact, "ChatRoom", 0)) return;
+ if (ppro->isChatRoom(hContact)) return;
unsigned i = ppro->getByte(hContact, AIM_KEY_AC, 0) - 1;
ExtraIcon_SetIcon(hExtraAT, hContact, (i < 5) ? GetIconHandle(extra_AT_icon_name[i]) : NULL);
@@ -130,7 +130,7 @@ static void set_AT_icon(CAimProto* ppro, HANDLE hContact) static void set_ES_icon(CAimProto* ppro, HANDLE hContact)
{
- if (ppro->getByte(hContact, "ChatRoom", 0)) return;
+ if (ppro->isChatRoom(hContact)) return;
unsigned i = ppro->getByte(hContact, AIM_KEY_ET, 0) - 1;
ExtraIcon_SetIcon(hExtraAT, hContact, (i < 2) ? GetIconHandle(extra_ES_icon_name[i]) : NULL);
@@ -145,14 +145,14 @@ void set_contact_icon(CAimProto* ppro, HANDLE hContact) void remove_AT_icons(CAimProto* ppro)
{
for (HANDLE hContact = db_find_first(ppro->m_szModuleName); hContact; hContact = db_find_next(hContact, ppro->m_szModuleName))
- if (!ppro->getByte(hContact, "ChatRoom", 0))
+ if (!ppro->isChatRoom(hContact))
ExtraIcon_Clear(hExtraAT, hContact);
}
void remove_ES_icons(CAimProto* ppro)
{
for (HANDLE hContact = db_find_first(ppro->m_szModuleName); hContact; hContact = db_find_next(hContact, ppro->m_szModuleName))
- if (!ppro->getByte(hContact, "ChatRoom", 0))
+ if (!ppro->isChatRoom(hContact))
ExtraIcon_Clear(hExtraES, hContact);
}
@@ -203,11 +203,11 @@ void InitThemeSupport(void) int CAimProto::OnPreBuildContactMenu(WPARAM wParam,LPARAM /*lParam*/)
{
HANDLE hContact = (HANDLE)wParam;
- bool isChatRoom = getByte(hContact, "ChatRoom", 0) != 0;
+ bool bIsChatRoom = isChatRoom(hContact);
//see if we should add the html away message context menu items
- Menu_ShowItem(hHTMLAwayContextMenuItem, getWord(hContact, AIM_KEY_ST, ID_STATUS_OFFLINE) == ID_STATUS_AWAY && !isChatRoom);
- Menu_ShowItem(hAddToServerListContextMenuItem, !getBuddyId(hContact, 1) && state != 0 && !isChatRoom);
+ Menu_ShowItem(hHTMLAwayContextMenuItem, getWord(hContact, AIM_KEY_ST, ID_STATUS_OFFLINE) == ID_STATUS_AWAY && !bIsChatRoom);
+ Menu_ShowItem(hAddToServerListContextMenuItem, !getBuddyId(hContact, 1) && state != 0 && !bIsChatRoom);
DBVARIANT dbv;
if (!getString(hContact, AIM_KEY_SN, &dbv)) {
diff --git a/protocols/AimOscar/src/ui.cpp b/protocols/AimOscar/src/ui.cpp index b7bac0cb13..9c165eb7b5 100644 --- a/protocols/AimOscar/src/ui.cpp +++ b/protocols/AimOscar/src/ui.cpp @@ -53,11 +53,11 @@ void DrawMyControl(HDC hDC, HWND /*hwndButton*/, HANDLE hTheme, UINT iState, REC {
if (bIsFocused)
{
- HBRUSH br = CreateSolidBrush(RGB(0,0,0));
+ HBRUSH br = CreateSolidBrush(RGB(0,0,0));
FrameRect(hDC, &rect, br);
InflateRect(&rect, -1, -1);
DeleteObject(br);
- } // if
+ } // if
COLORREF crColor = GetSysColor(COLOR_BTNFACE);
HBRUSH brBackground = CreateSolidBrush(crColor);
FillRect(hDC,&rect, brBackground);
@@ -84,7 +84,7 @@ static INT_PTR CALLBACK userinfo_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, L {
CAimProto* ppro = (CAimProto*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
- switch (msg)
+ switch (msg)
{
case WM_INITDIALOG:
{
@@ -166,7 +166,7 @@ static INT_PTR CALLBACK userinfo_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, L break;
}
case WM_NOTIFY:
- switch (LOWORD(wParam))
+ switch (LOWORD(wParam))
{
case IDC_PROFILE:
if (((LPNMHDR)lParam)->code==EN_SELCHANGE)
@@ -199,7 +199,7 @@ static INT_PTR CALLBACK userinfo_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, L break;
default:
- if (((LPNMHDR)lParam)->code == PSN_PARAMCHANGED)
+ if (((LPNMHDR)lParam)->code == PSN_PARAMCHANGED)
{
ppro = (CAimProto*)((PSHNOTIFY*)lParam)->lParam;
SetWindowLongPtr(hwndDlg, GWLP_USERDATA, LPARAM(ppro));
@@ -234,12 +234,12 @@ static INT_PTR CALLBACK userinfo_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, L BOOL isSuper = (cfOld.dwEffects & CFE_SUPERSCRIPT) && (cfOld.dwMask & CFM_SUPERSCRIPT);
if (isSuper)
{
- DrawMyControl(lpDIS->hDC,GetDlgItem(hwndDlg, IDC_BOLD),hThemeButton,lpDIS->itemState|ODS_SELECTED, lpDIS->rcItem);
+ 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);
ReleaseIconEx("sup_scrpt");
}
else
- {
+ {
DrawMyControl(lpDIS->hDC,GetDlgItem(hwndDlg, IDC_BOLD),hThemeButton,lpDIS->itemState, lpDIS->rcItem);
DrawIconEx(lpDIS->hDC, 4, 5, LoadIconEx("nsup_scrpt"), 16, 16, 0, 0, DI_NORMAL);
ReleaseIconEx("nsup_scrpt");
@@ -276,7 +276,7 @@ static INT_PTR CALLBACK userinfo_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, L 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);
+ DrawIconEx(lpDIS->hDC, 4, 5, LoadIconEx("sub_scrpt"), 16, 16, 0, 0, DI_NORMAL);
ReleaseIconEx("sub_scrpt");
}
else
@@ -422,7 +422,7 @@ static INT_PTR CALLBACK userinfo_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, L }
case WM_COMMAND:
- switch (LOWORD(wParam))
+ switch (LOWORD(wParam))
{
case IDC_PROFILE:
if (HIWORD(wParam) == EN_CHANGE)
@@ -442,7 +442,7 @@ static INT_PTR CALLBACK userinfo_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, L break;
case IDC_SUPERSCRIPT:
- if (HIWORD(wParam) == BN_CLICKED)
+ if (HIWORD(wParam) == BN_CLICKED)
{
CHARFORMAT2 cf;
cf.cbSize = sizeof(CHARFORMAT2);
@@ -456,7 +456,7 @@ static INT_PTR CALLBACK userinfo_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, L break;
case IDC_NORMALSCRIPT:
- if (HIWORD(wParam) == BN_CLICKED)
+ if (HIWORD(wParam) == BN_CLICKED)
{
CHARFORMAT2 cf;
cf.cbSize = sizeof(CHARFORMAT2);
@@ -470,7 +470,7 @@ static INT_PTR CALLBACK userinfo_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, L break;
case IDC_SUBSCRIPT:
- if (HIWORD(wParam) == BN_CLICKED)
+ if (HIWORD(wParam) == BN_CLICKED)
{
CHARFORMAT2 cf;
cf.cbSize = sizeof(CHARFORMAT2);
@@ -484,7 +484,7 @@ static INT_PTR CALLBACK userinfo_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, L break;
case IDC_BOLD:
- if (HIWORD(wParam) == BN_CLICKED)
+ if (HIWORD(wParam) == BN_CLICKED)
{
CHARFORMAT2 cfOld;
cfOld.cbSize = sizeof(CHARFORMAT2);
@@ -502,7 +502,7 @@ static INT_PTR CALLBACK userinfo_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, L break;
case IDC_ITALIC:
- if (HIWORD(wParam) == BN_CLICKED)
+ if (HIWORD(wParam) == BN_CLICKED)
{
CHARFORMAT2 cfOld;
cfOld.cbSize = sizeof(CHARFORMAT2);
@@ -538,7 +538,7 @@ static INT_PTR CALLBACK userinfo_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, L break;
case IDC_FOREGROUNDCOLOR:
- if (HIWORD(wParam) == BN_CLICKED)
+ if (HIWORD(wParam) == BN_CLICKED)
{
CHARFORMAT2 cf;
cf.cbSize = sizeof(CHARFORMAT2);
@@ -552,7 +552,7 @@ static INT_PTR CALLBACK userinfo_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, L break;
case IDC_FOREGROUNDCOLORPICKER:
- if (HIWORD(wParam) == BN_CLICKED)
+ if (HIWORD(wParam) == BN_CLICKED)
{
CHOOSECOLOR cc={0};
custColours[0]=foreground;
@@ -562,7 +562,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);
@@ -572,7 +572,7 @@ static INT_PTR CALLBACK userinfo_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, L break;
case IDC_BACKGROUNDCOLOR:
- if (HIWORD(wParam) == BN_CLICKED)
+ if (HIWORD(wParam) == BN_CLICKED)
{
CHARFORMAT2 cf;
cf.cbSize = sizeof(CHARFORMAT2);
@@ -648,7 +648,7 @@ INT_PTR CALLBACK admin_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPar CAimProto* ppro = (CAimProto*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
DBVARIANT dbv;
- switch (msg)
+ switch (msg)
{
case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
@@ -660,7 +660,7 @@ INT_PTR CALLBACK admin_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPar break;
case WM_NOTIFY:
- switch (((LPNMHDR)lParam)->code)
+ switch (((LPNMHDR)lParam)->code)
{
case PSN_PARAMCHANGED:
ppro = (CAimProto*)((LPPSHNOTIFY)lParam)->lParam;
@@ -688,7 +688,7 @@ INT_PTR CALLBACK admin_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPar break;
case WM_COMMAND:
- if (LOWORD(wParam) == IDC_SAVECHANGES)
+ if (LOWORD(wParam) == IDC_SAVECHANGES)
{
if (!ppro->wait_conn(ppro->hAdminConn, ppro->hAdminEvent, 0x07)) // Make a connection
break;
@@ -783,7 +783,7 @@ static INT_PTR CALLBACK options_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, LP {
CAimProto* ppro = (CAimProto*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
- switch (msg)
+ switch (msg)
{
case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
@@ -792,28 +792,28 @@ static INT_PTR CALLBACK options_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, LP ppro = (CAimProto*)lParam;
{
DBVARIANT dbv;
- if (!ppro->getString(AIM_KEY_SN, &dbv))
+ if (!ppro->getString(AIM_KEY_SN, &dbv))
{
SetDlgItemTextA(hwndDlg, IDC_SN, dbv.pszVal);
db_free(&dbv);
}
- if (!ppro->getString(AIM_KEY_NK, &dbv))
+ if (!ppro->getString(AIM_KEY_NK, &dbv))
{
SetDlgItemTextA(hwndDlg, IDC_NK, dbv.pszVal);
db_free(&dbv);
}
- else if (!ppro->getString(AIM_KEY_SN, &dbv))
+ else if (!ppro->getString(AIM_KEY_SN, &dbv))
{
SetDlgItemTextA(hwndDlg, IDC_NK, dbv.pszVal);
db_free(&dbv);
}
- if (!ppro->getString(AIM_KEY_PW, &dbv))
+ if (!ppro->getString(AIM_KEY_PW, &dbv))
{
CallService(MS_DB_CRYPT_DECODESTRING, strlen(dbv.pszVal) + 1, (LPARAM) dbv.pszVal);
SetDlgItemTextA(hwndDlg, IDC_PW, dbv.pszVal);
db_free(&dbv);
}
- if (!ppro->getString(AIM_KEY_HN, &dbv))
+ if (!ppro->getString(AIM_KEY_HN, &dbv))
{
SetDlgItemTextA(hwndDlg, IDC_HN, dbv.pszVal);
db_free(&dbv);
@@ -851,17 +851,17 @@ static INT_PTR CALLBACK options_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, LP }
break;
- case IDC_SVRRESET:
- SetDlgItemTextA(hwndDlg, IDC_HN,
+ case IDC_SVRRESET:
+ SetDlgItemTextA(hwndDlg, IDC_HN,
IsDlgButtonChecked(hwndDlg, IDC_DSSL) ? AIM_DEFAULT_SERVER_NS : AIM_DEFAULT_SERVER);
SetDlgItemInt(hwndDlg, IDC_PN,ppro->get_default_port(), FALSE);
break;
- case IDC_SN:
- case IDC_PN:
- case IDC_NK:
- case IDC_PW:
- case IDC_HN:
+ case IDC_SN:
+ case IDC_PN:
+ case IDC_NK:
+ case IDC_PW:
+ case IDC_HN:
if (HIWORD(wParam) != EN_CHANGE || (HWND) lParam != GetFocus())
return 0;
break;
@@ -870,7 +870,7 @@ static INT_PTR CALLBACK options_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, LP break;
case WM_NOTIFY:
- switch (((LPNMHDR) lParam)->code)
+ switch (((LPNMHDR) lParam)->code)
{
case PSN_APPLY:
{
@@ -1025,7 +1025,7 @@ static INT_PTR CALLBACK privacy_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, LP CAimProto* ppro = (CAimProto*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
int i;
- switch (msg)
+ switch (msg)
{
case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
@@ -1043,7 +1043,7 @@ static INT_PTR CALLBACK privacy_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, LP CheckDlgButton (hwndDlg, IDC_SIS, (ppro->pref1_flags & 0x400) ? BST_CHECKED : BST_CHECKED);
break;
-
+
case WM_COMMAND:
if (LOWORD(wParam) == IDC_ALLOWADD)
{
@@ -1072,7 +1072,7 @@ static INT_PTR CALLBACK privacy_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, LP break;
case WM_NOTIFY:
- if (((LPNMHDR) lParam)->code == PSN_APPLY)
+ if (((LPNMHDR) lParam)->code == PSN_APPLY)
{
ppro->aim_ssi_update(ppro->hServerConn, ppro->seqno, true);
for (i=0; i<5; ++i)
@@ -1139,8 +1139,8 @@ static INT_PTR CALLBACK privacy_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, LP break;
}
return FALSE;
-}
-
+}
+
int CAimProto::OnOptionsInit(WPARAM wParam,LPARAM lParam)
{
@@ -1157,7 +1157,7 @@ int CAimProto::OnOptionsInit(WPARAM wParam,LPARAM lParam) odp.pszTemplate = MAKEINTRESOURCEA(IDD_AIM);
odp.pfnDlgProc = options_dialog;
Options_AddPage(wParam, &odp);
-
+
odp.ptszTab = LPGENT("Privacy");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_PRIVACY);
odp.pfnDlgProc = privacy_dialog;
@@ -1172,7 +1172,7 @@ int CAimProto::OnOptionsInit(WPARAM wParam,LPARAM lParam) INT_PTR CALLBACK first_run_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
- switch (msg)
+ switch (msg)
{
case WM_INITDIALOG:
{
@@ -1198,15 +1198,15 @@ INT_PTR CALLBACK first_run_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM }
case WM_COMMAND:
- if (LOWORD(wParam) == IDC_NEWAIMACCOUNTLINK)
+ if (LOWORD(wParam) == IDC_NEWAIMACCOUNTLINK)
{
CallService(MS_UTILS_OPENURL, 1, (LPARAM)"http://www.aim.com/redirects/inclient/register.adp");
return TRUE;
}
- if (HIWORD(wParam) == EN_CHANGE && (HWND)lParam == GetFocus())
+ if (HIWORD(wParam) == EN_CHANGE && (HWND)lParam == GetFocus())
{
- switch(LOWORD(wParam))
+ switch(LOWORD(wParam))
{
case IDC_SN: case IDC_PW:
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
@@ -1215,7 +1215,7 @@ INT_PTR CALLBACK first_run_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM break;
case WM_NOTIFY:
- if (((LPNMHDR)lParam)->code == (UINT)PSN_APPLY)
+ if (((LPNMHDR)lParam)->code == (UINT)PSN_APPLY)
{
CAimProto* ppro = (CAimProto*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
@@ -1235,7 +1235,7 @@ INT_PTR CALLBACK first_run_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM INT_PTR CAimProto::SvcCreateAccMgrUI(WPARAM wParam, LPARAM lParam)
{
- return (INT_PTR)CreateDialogParam (hInstance, MAKEINTRESOURCE(IDD_AIMACCOUNT),
+ return (INT_PTR)CreateDialogParam (hInstance, MAKEINTRESOURCE(IDD_AIMACCOUNT),
(HWND)lParam, first_run_dialog, (LPARAM)this);
}
@@ -1247,7 +1247,7 @@ INT_PTR CALLBACK instant_idle_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR {
CAimProto* ppro = (CAimProto*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
- switch (msg)
+ switch (msg)
{
case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
@@ -1278,11 +1278,11 @@ INT_PTR CALLBACK instant_idle_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR if (minutes > 59)
minutes = 59;
ppro->setDword(AIM_KEY_IIT, hours*60+minutes);
- switch (LOWORD(wParam))
+ switch (LOWORD(wParam))
{
case IDOK:
//Instant Idle
- if (ppro->state==1)
+ if (ppro->state==1)
{
ppro->aim_set_idle(ppro->hServerConn,ppro->seqno,hours * 60 * 60 + minutes * 60);
ppro->instantidle=1;
@@ -1310,7 +1310,7 @@ INT_PTR CALLBACK join_chat_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM {
CAimProto* ppro = (CAimProto*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
- switch (msg)
+ switch (msg)
{
case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
@@ -1330,7 +1330,7 @@ INT_PTR CALLBACK join_chat_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM case WM_COMMAND:
{
- switch (LOWORD(wParam))
+ switch (LOWORD(wParam))
{
case IDOK:
char room[128];
@@ -1361,7 +1361,7 @@ static void clist_chat_invite_send(HANDLE hItem, HWND hwndList, chat_list_item* if (hItem == NULL)
hItem = (HANDLE)SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_ROOT, 0);
- while (hItem)
+ while (hItem)
{
if (IsHContactGroup(hItem))
{
@@ -1379,16 +1379,16 @@ static void clist_chat_invite_send(HANDLE hItem, HWND hwndList, chat_list_item* SendMessage(hwndList, CLM_GETITEMTEXT, (WPARAM)hItem, (LPARAM)buf);
char* sn = mir_t2a(buf);
- ppro->aim_chat_invite(ppro->hServerConn, ppro->seqno,
+ ppro->aim_chat_invite(ppro->hServerConn, ppro->seqno,
item->cookie, item->exchange, item->instance, sn, msg);
mir_free(sn);
}
- else
+ else
{
DBVARIANT dbv;
if (!ppro->getString(hItem, AIM_KEY_SN, &dbv))
{
- ppro->aim_chat_invite(ppro->hServerConn, ppro->seqno,
+ ppro->aim_chat_invite(ppro->hServerConn, ppro->seqno,
item->cookie, item->exchange, item->instance, dbv.pszVal, msg);
db_free(&dbv);
}
@@ -1401,7 +1401,7 @@ static void clist_chat_invite_send(HANDLE hItem, HWND hwndList, chat_list_item* static void clist_validate_contact(HANDLE hItem, HWND hwndList, CAimProto* ppro)
{
- if (!ppro->is_my_contact(hItem) || ppro->getByte(hItem, "ChatRoom", 0) ||
+ if (!ppro->is_my_contact(hItem) || ppro->isChatRoom(hItem) ||
ppro->getWord(hItem, AIM_KEY_ST, ID_STATUS_OFFLINE) == ID_STATUS_ONTHEPHONE)
SendMessage(hwndList, CLM_DELETEITEM, (WPARAM)hItem, 0);
}
@@ -1411,7 +1411,7 @@ static void clist_chat_prepare(HANDLE hItem, HWND hwndList, CAimProto* ppro) if (hItem == NULL)
hItem = (HANDLE)SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_ROOT, 0);
- while (hItem)
+ while (hItem)
{
HANDLE hItemN = (HANDLE)SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_NEXT, (LPARAM)hItem);
@@ -1432,7 +1432,7 @@ INT_PTR CALLBACK invite_to_chat_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, LP {
invite_chat_param* param = (invite_chat_param*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
- switch (msg)
+ switch (msg)
{
case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
@@ -1459,17 +1459,17 @@ INT_PTR CALLBACK invite_to_chat_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, LP NMCLISTCONTROL* nmc = (NMCLISTCONTROL*)lParam;
if (nmc->hdr.idFrom == IDC_CCLIST)
{
- switch (nmc->hdr.code)
+ switch (nmc->hdr.code)
{
case CLN_NEWCONTACT:
- if (param && (nmc->flags & (CLNF_ISGROUP | CLNF_ISINFO)) == 0)
+ if (param && (nmc->flags & (CLNF_ISGROUP | CLNF_ISINFO)) == 0)
clist_validate_contact(nmc->hItem, nmc->hdr.hwndFrom, param->ppro);
break;
case CLN_LISTREBUILT:
- if (param)
+ if (param)
clist_chat_prepare(NULL, nmc->hdr.hwndFrom, param->ppro);
- break;
+ break;
}
}
}
@@ -1477,7 +1477,7 @@ INT_PTR CALLBACK invite_to_chat_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, LP case WM_COMMAND:
{
- switch (LOWORD(wParam))
+ switch (LOWORD(wParam))
{
case IDC_ADDSCR:
if (param->ppro->state == 1)
@@ -1527,7 +1527,7 @@ INT_PTR CALLBACK chat_request_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR {
invite_chat_req_param* param = (invite_chat_req_param*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
- switch (msg)
+ switch (msg)
{
case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
@@ -1548,12 +1548,12 @@ INT_PTR CALLBACK chat_request_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR case WM_DESTROY:
WindowFreeIcon(hwndDlg);
- delete param;
+ delete param;
break;
case WM_COMMAND:
{
- switch (LOWORD(wParam))
+ switch (LOWORD(wParam))
{
case IDOK:
param->ppro->ForkThread(&CAimProto::chatnav_request_thread, param->cnp);
@@ -1575,6 +1575,6 @@ INT_PTR CALLBACK chat_request_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR void CALLBACK chat_request_cb(PVOID dwParam)
{
- CreateDialogParam (hInstance, MAKEINTRESOURCE(IDD_CHATROOM_INVITE_REQ),
+ CreateDialogParam (hInstance, MAKEINTRESOURCE(IDD_CHATROOM_INVITE_REQ),
NULL, chat_request_dialog, (LPARAM)dwParam);
}
diff --git a/protocols/FacebookRM/src/contacts.cpp b/protocols/FacebookRM/src/contacts.cpp index 07086cb981..7c42c1a951 100644 --- a/protocols/FacebookRM/src/contacts.cpp +++ b/protocols/FacebookRM/src/contacts.cpp @@ -28,8 +28,7 @@ bool FacebookProto::IsMyContact(HANDLE hContact, bool include_chat) if (proto && !strcmp(m_szModuleName, proto)) {
if (include_chat)
return true;
- else
- return !getByte(hContact, "ChatRoom", 0);
+ return !isChatRoom(hContact);
}
return false;
}
@@ -119,7 +118,7 @@ HANDLE FacebookProto::AddToContactList(facebook_user* fbu, ContactType type, boo void FacebookProto::SetAllContactStatuses(int status, bool reset_client)
{
for (HANDLE hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
- if (getByte(hContact, "ChatRoom", 0))
+ if ( isChatRoom(hContact))
continue;
if (reset_client) {
diff --git a/protocols/FacebookRM/src/process.cpp b/protocols/FacebookRM/src/process.cpp index 44c90e90fe..2541fe07f8 100644 --- a/protocols/FacebookRM/src/process.cpp +++ b/protocols/FacebookRM/src/process.cpp @@ -158,7 +158,7 @@ void FacebookProto::ProcessFriendList(void* data) // Check and update old contacts
for (HANDLE hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
- if (getByte(hContact, "ChatRoom", 0))
+ if ( isChatRoom(hContact))
continue;
DBVARIANT dbv;
diff --git a/protocols/FacebookRM/src/proto.cpp b/protocols/FacebookRM/src/proto.cpp index 55655dbb10..41ac1cef71 100644 --- a/protocols/FacebookRM/src/proto.cpp +++ b/protocols/FacebookRM/src/proto.cpp @@ -551,8 +551,7 @@ INT_PTR FacebookProto::CancelFriendship(WPARAM wParam,LPARAM lParam) HANDLE hContact = reinterpret_cast<HANDLE>(wParam);
// Ignore groupchats and, if deleting, also not-friends
- if (getByte(hContact, "ChatRoom", 0)
- || (deleting && getByte(hContact, FACEBOOK_KEY_CONTACT_TYPE, 0) != CONTACT_FRIEND))
+ if ( isChatRoom(hContact) || (deleting && getByte(hContact, FACEBOOK_KEY_CONTACT_TYPE, 0) != CONTACT_FRIEND))
return 0;
ptrT tname = db_get_tsa(hContact, m_szModuleName, FACEBOOK_KEY_NAME);
diff --git a/protocols/FacebookRM/src/theme.cpp b/protocols/FacebookRM/src/theme.cpp index f7c6889c66..054a05c134 100644 --- a/protocols/FacebookRM/src/theme.cpp +++ b/protocols/FacebookRM/src/theme.cpp @@ -146,12 +146,12 @@ void UninitContactMenus() int FacebookProto::OnPrebuildContactMenu(WPARAM wParam,LPARAM lParam)
{
HANDLE hContact = reinterpret_cast<HANDLE>(wParam);
- bool isChatroom = getByte(hContact, "ChatRoom", 0) > 0;
+ bool bIsChatroom = isChatRoom(hContact);
Menu_ShowItem(g_hContactMenuItems[CMI_VISIT_PROFILE], true);
- Menu_ShowItem(g_hContactMenuItems[CMI_VISIT_FRIENDSHIP], !isChatroom);
+ Menu_ShowItem(g_hContactMenuItems[CMI_VISIT_FRIENDSHIP], !bIsChatroom);
- if (!isOffline() && !isChatroom)
+ if (!isOffline() && !bIsChatroom)
{
bool ctrlPressed = (GetKeyState(VK_CONTROL) & 0x8000) != 0;
BYTE type = getByte(hContact, FACEBOOK_KEY_CONTACT_TYPE, 0);
diff --git a/protocols/Gadu-Gadu/src/core.cpp b/protocols/Gadu-Gadu/src/core.cpp index 03d23031ed..63b5c14735 100644 --- a/protocols/Gadu-Gadu/src/core.cpp +++ b/protocols/Gadu-Gadu/src/core.cpp @@ -1293,14 +1293,11 @@ void GGPROTO::broadcastnewstatus(int newStatus) int GGPROTO::contactdeleted(WPARAM wParam, LPARAM lParam)
{
HANDLE hContact = (HANDLE) wParam;
- uin_t uin; int type;
- DBVARIANT dbv;
-
- uin = (uin_t)getDword(hContact, GG_KEY_UIN, 0);
- type = getByte(hContact, "ChatRoom", 0);
+ uin_t uin = (uin_t)getDword(hContact, GG_KEY_UIN, 0);
// Terminate conference if contact is deleted
- if (type && !getTString(hContact, "ChatRoomID", &dbv) && gc_enabled)
+ DBVARIANT dbv;
+ if ( isChatRoom(hContact) && !getTString(hContact, "ChatRoomID", &dbv) && gc_enabled)
{
GCDEST gcdest = {0};
gcdest.pszModule = m_szModuleName;
@@ -1378,8 +1375,7 @@ int GGPROTO::dbsettingchanged(WPARAM wParam, LPARAM lParam) // Groupchat window contact is being renamed
DBVARIANT dbv;
- int type = getByte(hContact, "ChatRoom", 0);
- if (type && !getTString(hContact, "ChatRoomID", &dbv))
+ if (isChatRoom(hContact) && !getTString(hContact, "ChatRoomID", &dbv))
{
// Most important... check redundancy (fucking cascading)
static int cascade = 0;
@@ -1561,7 +1557,7 @@ HANDLE GGPROTO::getcontact(uin_t uin, int create, int inlist, TCHAR *szNick) #endif
// Look for contact in DB
for (HANDLE hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
- if ((uin_t)getDword(hContact, GG_KEY_UIN, 0) == uin && !getByte(hContact, "ChatRoom", 0)) {
+ if ((uin_t)getDword(hContact, GG_KEY_UIN, 0) == uin && !isChatRoom(hContact)) {
if (inlist) {
db_unset(hContact, "CList", "NotOnList");
db_unset(hContact, "CList", "Hidden");
diff --git a/protocols/Gadu-Gadu/src/dialogs.cpp b/protocols/Gadu-Gadu/src/dialogs.cpp index 55d531e6af..ffc5c96f4e 100644 --- a/protocols/Gadu-Gadu/src/dialogs.cpp +++ b/protocols/Gadu-Gadu/src/dialogs.cpp @@ -907,9 +907,13 @@ static INT_PTR CALLBACK gg_detailsdlgproc(HWND hwndDlg, UINT msg, WPARAM wParam, int GGPROTO::details_init(WPARAM wParam, LPARAM lParam)
{
- char* szProto = GetContactProto((HANDLE)lParam);
- if ((szProto == NULL || strcmp(szProto, m_szModuleName)) && lParam || lParam && db_get_b((HANDLE)lParam, m_szModuleName, "ChatRoom", 0))
- return 0;
+ HANDLE hContact = (HANDLE)lParam;
+ char* szProto = GetContactProto(hContact);
+ if (szProto == NULL)
+ return 0;
+
+ if (hContact && (strcmp(szProto, m_szModuleName) || isChatRoom(hContact)))
+ return 0;
// Here goes init
OPTIONSDIALOGPAGE odp = { sizeof(odp) };
diff --git a/protocols/Gadu-Gadu/src/gg.cpp b/protocols/Gadu-Gadu/src/gg.cpp index 697ab3d8e0..836384139c 100644 --- a/protocols/Gadu-Gadu/src/gg.cpp +++ b/protocols/Gadu-Gadu/src/gg.cpp @@ -234,8 +234,7 @@ static int gg_prebuildcontactmenu(WPARAM wParam, LPARAM lParam) CLISTMENUITEM mi = { sizeof(mi) };
mi.flags = CMIM_NAME | CMIM_FLAGS | CMIF_TCHAR;
if ( gg->getDword(hContact, GG_KEY_UIN, 0) == gg->getByte(GG_KEY_UIN, 0) ||
- gg->getByte(hContact, "ChatRoom", 0) ||
- db_get_b(hContact, "CList", "NotOnList", 0))
+ gg->isChatRoom(hContact) || db_get_b(hContact, "CList", "NotOnList", 0))
mi.flags |= CMIF_HIDDEN;
mi.ptszName = gg->getByte(hContact, GG_KEY_BLOCK, 0) ? LPGENT("&Unblock") : LPGENT("&Block");
Menu_ModifyItem(gg->hBlockMenuItem, &mi);
diff --git a/protocols/Gadu-Gadu/src/import.cpp b/protocols/Gadu-Gadu/src/import.cpp index d6b2e84afd..d19d5abaea 100644 --- a/protocols/Gadu-Gadu/src/import.cpp +++ b/protocols/Gadu-Gadu/src/import.cpp @@ -102,7 +102,7 @@ char *gg_makecontacts(GGPROTO *gg, int cr) // Readup contacts
for (HANDLE hContact = db_find_first(gg->m_szModuleName); hContact; hContact = db_find_next(hContact, gg->m_szModuleName)) {
- if (gg->getByte(hContact, "ChatRoom", 0))
+ if (gg->isChatRoom(hContact))
continue;
// Readup FirstName
diff --git a/protocols/IRCG/src/clist.cpp b/protocols/IRCG/src/clist.cpp index 878faa9ec0..6c2a92de29 100644 --- a/protocols/IRCG/src/clist.cpp +++ b/protocols/IRCG/src/clist.cpp @@ -145,7 +145,7 @@ bool CIrcProto::CList_SetAllOffline(BYTE ChatsToo) DisconnectAllDCCSessions(false);
for (HANDLE hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
- if ( getByte( hContact, "ChatRoom", 0 ))
+ if ( isChatRoom(hContact))
continue;
if ( getByte(hContact, "DCC", 0 ) != 0 ) {
@@ -179,7 +179,7 @@ HANDLE CIrcProto::CList_FindContact (CONTACT* user) DBVARIANT dbv5;
for (HANDLE hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
- if ( getByte( hContact, "ChatRoom", 0))
+ if ( isChatRoom(hContact))
continue;
HANDLE hContact_temp = NULL;
diff --git a/protocols/IRCG/src/commandmonitor.cpp b/protocols/IRCG/src/commandmonitor.cpp index 345a0ff0e8..6873bc918c 100644 --- a/protocols/IRCG/src/commandmonitor.cpp +++ b/protocols/IRCG/src/commandmonitor.cpp @@ -140,7 +140,7 @@ VOID CALLBACK OnlineNotifTimerProc( HWND, UINT, UINT_PTR idEvent, DWORD ) if ( name.IsEmpty() && name2.IsEmpty()) {
DBVARIANT dbv;
for (HANDLE hContact = db_find_first(ppro->m_szModuleName); hContact; hContact = db_find_next(hContact, ppro->m_szModuleName)) {
- if ( ppro->getByte(hContact, "ChatRoom", 0))
+ if ( ppro->isChatRoom(hContact))
continue;
BYTE bDCC = ppro->getByte(hContact, "DCC", 0);
diff --git a/protocols/IRCG/src/ircproto.cpp b/protocols/IRCG/src/ircproto.cpp index 24028adc45..c45baa3d88 100644 --- a/protocols/IRCG/src/ircproto.cpp +++ b/protocols/IRCG/src/ircproto.cpp @@ -660,7 +660,7 @@ HANDLE __cdecl CIrcProto::SendFile( HANDLE hContact, const TCHAR*, TCHAR** ppszF unsigned __int64 size = 0;
// do not send to channels :-P
- if ( getByte(hContact, "ChatRoom", 0) != 0)
+ if ( isChatRoom(hContact))
return 0;
// stop if it is an active type filetransfer and the user's IP is not known
@@ -955,7 +955,7 @@ HANDLE __cdecl CIrcProto::GetAwayMsg( HANDLE hContact ) DBVARIANT dbv;
// bypass chat contacts.
- if ( getByte( hContact, "ChatRoom", 0 ) == 0) {
+ if ( !isChatRoom(hContact)) {
if ( hContact && !getTString( hContact, "Nick", &dbv)) {
int i = getWord( hContact, "Status", ID_STATUS_OFFLINE );
if ( i != ID_STATUS_AWAY) {
diff --git a/protocols/IRCG/src/services.cpp b/protocols/IRCG/src/services.cpp index 7755fa84fb..e4a4b8800e 100644 --- a/protocols/IRCG/src/services.cpp +++ b/protocols/IRCG/src/services.cpp @@ -219,7 +219,7 @@ int __cdecl CIrcProto::OnContactDeleted(WPARAM wp, LPARAM) DBVARIANT dbv;
if ( !getTString( hContact, "Nick", &dbv )) {
- int type = getByte( hContact, "ChatRoom", 0 );
+ int type = getByte(hContact, "ChatRoom", 0);
if ( type != 0 ) {
GCEVENT gce = {0};
GCDEST gcd = {0};
@@ -330,16 +330,16 @@ INT_PTR __cdecl CIrcProto::OnMenuDisconnect(WPARAM wp, LPARAM) INT_PTR __cdecl CIrcProto::OnMenuIgnore(WPARAM wp, LPARAM)
{
- if ( !wp )
+ if (!wp)
return 0;
- HANDLE hContact = (HANDLE) wp;
+ HANDLE hContact = (HANDLE)wp;
DBVARIANT dbv;
- if ( !getTString( hContact, "Nick", &dbv )) {
- if ( getByte(( HANDLE )wp, "ChatRoom", 0) == 0 ) {
+ if ( !getTString(hContact, "Nick", &dbv )) {
+ if ( !isChatRoom(hContact)) {
char* host = NULL;
DBVARIANT dbv1;
- if ( !getString((HANDLE) wp, "Host", &dbv1))
+ if ( !getString(hContact, "Host", &dbv1))
host = dbv1.pszVal;
if ( host ) {
diff --git a/protocols/IRCG/src/userinfo.cpp b/protocols/IRCG/src/userinfo.cpp index ef79488499..46432e6166 100644 --- a/protocols/IRCG/src/userinfo.cpp +++ b/protocols/IRCG/src/userinfo.cpp @@ -193,7 +193,7 @@ int __cdecl CIrcProto::OnInitUserInfo(WPARAM wParam, LPARAM lParam) if ( !hContact || !szProto || lstrcmpiA( szProto, m_szModuleName ))
return 0;
- if ( getByte( hContact, "ChatRoom", 0) != 0 )
+ if ( isChatRoom(hContact))
return 0;
if ( getByte( hContact, "DCC", 0) != 0)
diff --git a/protocols/MSN/src/msn_chat.cpp b/protocols/MSN/src/msn_chat.cpp index ca49d3d11f..f46ea96ce3 100644 --- a/protocols/MSN/src/msn_chat.cpp +++ b/protocols/MSN/src/msn_chat.cpp @@ -28,12 +28,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. HANDLE CMsnProto::MSN_GetChatInernalHandle(HANDLE hContact)
{
HANDLE result = hContact;
- int type = getByte(hContact, "ChatRoom", 0);
- if (type != 0)
- {
+ if ( isChatRoom(hContact)) {
DBVARIANT dbv;
- if (getString(hContact, "ChatRoomID", &dbv) == 0)
- {
+ if (getString(hContact, "ChatRoomID", &dbv) == 0) {
result = (HANDLE)(-atol(dbv.pszVal));
db_free(&dbv);
}
@@ -187,7 +184,7 @@ static void ChatInviteSend(HANDLE hItem, HWND hwndList, STRLIST &str, CMsnProto static void ChatValidateContact(HANDLE hItem, HWND hwndList, CMsnProto* ppro)
{
- if (!ppro->MSN_IsMyContact(hItem) || ppro->getByte(hItem, "ChatRoom", 0) || ppro->MSN_IsMeByContact(hItem))
+ if (!ppro->MSN_IsMyContact(hItem) || ppro->isChatRoom(hItem) || ppro->MSN_IsMeByContact(hItem))
SendMessage(hwndList, CLM_DELETEITEM, (WPARAM)hItem, 0);
}
diff --git a/protocols/MSN/src/msn_menu.cpp b/protocols/MSN/src/msn_menu.cpp index c8d88cf934..001efbb89a 100644 --- a/protocols/MSN/src/msn_menu.cpp +++ b/protocols/MSN/src/msn_menu.cpp @@ -143,7 +143,7 @@ int CMsnProto::OnPrebuildContactMenu(WPARAM wParam, LPARAM) bool isMe = MSN_IsMeByContact(hContact, szEmail);
if (szEmail[0]) {
int listId = Lists_GetMask(szEmail);
- bool noChat = !(listId & LIST_FL) || isMe || getByte(hContact, "ChatRoom", 0);
+ bool noChat = !(listId & LIST_FL) || isMe || isChatRoom(hContact);
CLISTMENUITEM mi = { sizeof(mi) };
mi.flags = CMIM_NAME;
diff --git a/protocols/MSN/src/msn_svcs.cpp b/protocols/MSN/src/msn_svcs.cpp index 4b4a0b3170..ee59fdccde 100644 --- a/protocols/MSN/src/msn_svcs.cpp +++ b/protocols/MSN/src/msn_svcs.cpp @@ -386,17 +386,14 @@ int CMsnProto::OnContactDeleted(WPARAM wParam, LPARAM lParam) if (!msnLoggedIn) //should never happen for MSN contacts
return 0;
- int type = getByte(hContact, "ChatRoom", 0);
- if (type != 0)
- {
+ if ( isChatRoom(hContact)) {
DBVARIANT dbv;
if (!getTString(hContact, "ChatRoomID", &dbv)) {
MSN_KillChatSession(dbv.ptszVal);
db_free(&dbv);
}
}
- else
- {
+ else {
char szEmail[MSN_MAX_EMAIL_LEN];
if (MSN_IsMeByContact(hContact, szEmail))
CallService(MS_CLIST_REMOVEEVENT, (WPARAM)hContact, (LPARAM) 1);
@@ -587,7 +584,7 @@ int CMsnProto::OnWindowPopup(WPARAM wParam, LPARAM lParam) {
MessageWindowPopupData *mwpd = (MessageWindowPopupData *)lParam;
- if (!MSN_IsMyContact(mwpd->hContact) || getByte(mwpd->hContact, "ChatRoom", 0))
+ if (!MSN_IsMyContact(mwpd->hContact) || isChatRoom(mwpd->hContact))
return 0;
switch (mwpd->uType)
@@ -624,11 +621,9 @@ INT_PTR CMsnProto::GetUnreadEmailCount(WPARAM wParam, LPARAM lParam) INT_PTR CMsnProto::OnLeaveChat(WPARAM wParam,LPARAM lParam)
{
HANDLE hContact = (HANDLE)wParam;
- if (getByte(hContact, "ChatRoom", 0) != 0)
- {
+ if (isChatRoom(hContact) != 0) {
DBVARIANT dbv;
- if (getTString(hContact, "ChatRoomID", &dbv) == 0)
- {
+ if (getTString(hContact, "ChatRoomID", &dbv) == 0) {
MSN_KillChatSession(dbv.ptszVal);
db_free(&dbv);
}
diff --git a/protocols/Skype/src/skype_blocked.cpp b/protocols/Skype/src/skype_blocked.cpp index 511c0fd423..ba6b123824 100644 --- a/protocols/Skype/src/skype_blocked.cpp +++ b/protocols/Skype/src/skype_blocked.cpp @@ -256,7 +256,7 @@ INT_PTR CALLBACK CSkypeProto::SkypeBlockedOptionsProc(HWND hwndDlg, UINT msg, WP ::EnterCriticalSection(&ppro->contact_search_lock);
- for (hContact = ::db_find_first(ppro->m_szModuleName); hContact && !ppro->IsChatRoom(hContact); hContact = ::db_find_next(hContact, ppro->m_szModuleName))
+ for (hContact = ::db_find_first(ppro->m_szModuleName); hContact && !ppro->isChatRoom(hContact); hContact = ::db_find_next(hContact, ppro->m_szModuleName))
{
ptrW sid(::db_get_wsa(hContact, ppro->m_szModuleName, SKYPE_SETTINGS_SID));
diff --git a/protocols/Skype/src/skype_chat.cpp b/protocols/Skype/src/skype_chat.cpp index 02988fd15c..57339feb7e 100644 --- a/protocols/Skype/src/skype_chat.cpp +++ b/protocols/Skype/src/skype_chat.cpp @@ -1017,7 +1017,7 @@ void ChatRoom::OnParticipantChanged(const ParticipantRef &participant, int prop) void CSkypeProto::ChatValidateContact(HANDLE hItem, HWND hwndList, const StringList &contacts)
{
- if (this->IsProtoContact(hItem) && !this->IsChatRoom(hItem))
+ if (this->IsProtoContact(hItem) && !this->isChatRoom(hItem))
{
ptrW sid( ::db_get_wsa(hItem, this->m_szModuleName, SKYPE_SETTINGS_SID));
if (sid == NULL || contacts.contains(sid))
@@ -1224,11 +1224,6 @@ INT_PTR CALLBACK CSkypeProto::ChatRoomProc(HWND hwndDlg, UINT msg, WPARAM wParam return FALSE;
}
-bool CSkypeProto::IsChatRoom(HANDLE hContact)
-{
- return this->getByte(hContact, "ChatRoom", 0) == 1;
-}
-
INT_PTR CSkypeProto::CreateChatRoomCommand(WPARAM, LPARAM)
{
ChatRoomParam *param = new ChatRoomParam(NULL, NULL, this);
diff --git a/protocols/Skype/src/skype_contacts.cpp b/protocols/Skype/src/skype_contacts.cpp index a1320dd145..0f848d522f 100644 --- a/protocols/Skype/src/skype_contacts.cpp +++ b/protocols/Skype/src/skype_contacts.cpp @@ -307,7 +307,7 @@ void CSkypeProto::SetAllContactStatus(int status) {
if (this->getByte(hContact, "IsSkypeOut", 0) != 0)
continue;
- if (this->IsChatRoom(hContact))
+ if (this->isChatRoom(hContact))
continue;
if (this->IsContactOnline(hContact))
::db_set_w(hContact, this->m_szModuleName, SKYPE_SETTINGS_STATUS, status);
diff --git a/protocols/Skype/src/skype_events.cpp b/protocols/Skype/src/skype_events.cpp index 59848a66aa..7b1db8fa82 100644 --- a/protocols/Skype/src/skype_events.cpp +++ b/protocols/Skype/src/skype_events.cpp @@ -69,7 +69,7 @@ int CSkypeProto::OnContactDeleted(WPARAM wParam, LPARAM lParam) HANDLE hContact = (HANDLE)wParam;
if (hContact)
{
- if (this->IsChatRoom(hContact))
+ if (this->isChatRoom(hContact))
{
this->OnLeaveChat(wParam, 0);
ptrW cid(::db_get_wsa(hContact, this->m_szModuleName, SKYPE_SETTINGS_SID));
@@ -205,12 +205,12 @@ int __cdecl CSkypeProto::OnTabSRMMButtonPressed(WPARAM wParam, LPARAM lParam) switch (cbcd->dwButtonId)
{
case BBB_ID_CONF_INVITE:
- if (this->IsOnline() && this->IsChatRoom(hContact))
+ if (this->IsOnline() && this->isChatRoom(hContact))
this->ChatRoomInvite(hContact);
break;
case BBB_ID_CONF_SPAWN:
- if (this->IsOnline() && !this->IsChatRoom(hContact))
+ if (this->IsOnline() && !this->isChatRoom(hContact))
{
SEStringList targets;
ptrW sid(::db_get_wsa(hContact, this->m_szModuleName, SKYPE_SETTINGS_SID));
diff --git a/protocols/Skype/src/skype_menus.cpp b/protocols/Skype/src/skype_menus.cpp index d1b46c376d..4ff59cf601 100644 --- a/protocols/Skype/src/skype_menus.cpp +++ b/protocols/Skype/src/skype_menus.cpp @@ -20,7 +20,7 @@ int CSkypeProto::OnPrebuildContactMenu(WPARAM wParam, LPARAM) if ( !this->IsOnline() || ::lstrcmpA(::GetContactProto(hContact), m_szModuleName))
return 0;
- if ( !this->IsChatRoom(hContact))
+ if ( !this->isChatRoom(hContact))
{
bool ctrlPressed = (::GetKeyState(VK_CONTROL) & 0x8000) != 0;
diff --git a/protocols/Skype/src/skype_messages.cpp b/protocols/Skype/src/skype_messages.cpp index 352aa5f291..ce1eb4755f 100644 --- a/protocols/Skype/src/skype_messages.cpp +++ b/protocols/Skype/src/skype_messages.cpp @@ -229,7 +229,7 @@ void CSkypeProto::SyncHistoryCommand(HANDLE hContact, time_t timestamp) ptrW sid = ::db_get_wsa(hContact, this->m_szModuleName, SKYPE_SETTINGS_SID);
ConversationRef conversation;
- if ( !this->IsChatRoom(hContact))
+ if ( !this->isChatRoom(hContact))
{
SEStringList target;
target.append((char *)ptrA(::mir_utf8encodeW(sid)));
@@ -294,7 +294,7 @@ int CSkypeProto::SyncAllTimeHistoryCommand(WPARAM wParam, LPARAM lParam) ptrW sid = ::db_get_wsa(hContact, this->m_szModuleName, SKYPE_SETTINGS_SID);
ConversationRef conversation;
- if ( !this->IsChatRoom(hContact))
+ if ( !this->isChatRoom(hContact))
{
SEStringList target;
target.append((char *)ptrA(::mir_utf8encodeW(sid)));
diff --git a/protocols/Skype/src/skype_proto.cpp b/protocols/Skype/src/skype_proto.cpp index 545770fad0..7a64df8adf 100644 --- a/protocols/Skype/src/skype_proto.cpp +++ b/protocols/Skype/src/skype_proto.cpp @@ -380,7 +380,7 @@ int __cdecl CSkypeProto::SendContacts(HANDLE hContact, int flags, int nContacts, this->Log(L"Outcoming contacts");
ConversationRef conversation;
- if ( !this->IsChatRoom(hContact))
+ if ( !this->isChatRoom(hContact))
{
SEStringList targets;
targets.append((char *)_T2A(::db_get_wsa(hContact, this->m_szModuleName, SKYPE_SETTINGS_SID)));
@@ -431,7 +431,7 @@ HANDLE __cdecl CSkypeProto::SendFile(HANDLE hContact, const TCHAR *szDescription this->Log(L"Outcoming file transfer");
ConversationRef conversation;
- if ( !this->IsChatRoom(hContact))
+ if ( !this->isChatRoom(hContact))
{
SEStringList targets;
targets.append((char *)_T2A(::db_get_wsa(hContact, this->m_szModuleName, SKYPE_SETTINGS_SID)));
diff --git a/protocols/Skype/src/skype_proto.h b/protocols/Skype/src/skype_proto.h index 97ae2c8143..a391ecd0ed 100644 --- a/protocols/Skype/src/skype_proto.h +++ b/protocols/Skype/src/skype_proto.h @@ -324,8 +324,6 @@ protected: void InitChatModule();
INT_PTR __cdecl SkypeGCGetToolTipText(WPARAM wParam, LPARAM lParam);
- bool IsChatRoom(HANDLE hContact);
-
void UpdateChatUserStatus(const ContactRef &contact);
void UpdateChatUserNick(const ContactRef &contact);
diff --git a/protocols/Tlen/src/jabber_svc.cpp b/protocols/Tlen/src/jabber_svc.cpp index bade2c8869..46ef0b78b5 100644 --- a/protocols/Tlen/src/jabber_svc.cpp +++ b/protocols/Tlen/src/jabber_svc.cpp @@ -551,7 +551,7 @@ struct SENDACKTHREADDATA __inline SENDACKTHREADDATA(TlenProtocol *_ppro, HANDLE _hContact, int _msgid=0) :
proto(_ppro), hContact(_hContact), msgid(_msgid)
{}
-
+
TlenProtocol *proto;
HANDLE hContact;
int msgid;
@@ -581,7 +581,7 @@ static void __cdecl TlenGetAwayMsgThread(void *ptr) if (!db_get(data->hContact, data->proto->m_szModuleName, "jid", &dbv)) {
if ((item=JabberListGetItemPtr(data->proto, LIST_ROSTER, dbv.pszVal)) != NULL) {
db_free(&dbv);
- ProtoBroadcastAck(data->proto->m_szModuleName, data->hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)1,
+ ProtoBroadcastAck(data->proto->m_szModuleName, data->hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)1,
item->statusMessage==NULL ? (LPARAM)NULL : (LPARAM)(TCHAR*)_A2T(item->statusMessage));
return;
}
@@ -913,7 +913,6 @@ int JabberDbSettingChanged(void *ptr, WPARAM wParam, LPARAM lParam) hContact = (HANDLE) wParam;
szProto = GetContactProto(hContact);
if (szProto == NULL || strcmp(szProto, proto->m_szModuleName)) return 0;
-// if (db_get_b(hContact, proto->m_szModuleName, "ChatRoom", 0) != 0) return 0;
// A contact's group is changed
if (!strcmp(cws->szSetting, "Group")) {
if (!db_get(hContact, proto->m_szModuleName, "jid", &dbv)) {
diff --git a/protocols/Twitter/src/chat.cpp b/protocols/Twitter/src/chat.cpp index 96ad8af6da..5a03d293a7 100644 --- a/protocols/Twitter/src/chat.cpp +++ b/protocols/Twitter/src/chat.cpp @@ -198,7 +198,7 @@ void TwitterProto::SetChatStatus(int status) {
// Add all friends to contact list
for(HANDLE hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
- if( db_get_b(hContact, m_szModuleName, "ChatRoom", 0))
+ if( isChatRoom(hContact))
continue;
DBVARIANT uid,nick;
diff --git a/protocols/Twitter/src/contacts.cpp b/protocols/Twitter/src/contacts.cpp index da9ce0d79c..763ce1f699 100644 --- a/protocols/Twitter/src/contacts.cpp +++ b/protocols/Twitter/src/contacts.cpp @@ -214,7 +214,7 @@ bool TwitterProto::IsMyContact(HANDLE hContact,bool include_chat) if(proto && strcmp(m_szModuleName,proto) == 0) {
if(include_chat)
return true;
- return db_get_b(hContact,m_szModuleName,"ChatRoom",0) == 0;
+ return !isChatRoom(hContact);
}
else return false;
}
diff --git a/protocols/Twitter/src/proto.cpp b/protocols/Twitter/src/proto.cpp index 5a54c199e3..659fee4fd2 100644 --- a/protocols/Twitter/src/proto.cpp +++ b/protocols/Twitter/src/proto.cpp @@ -502,7 +502,7 @@ void TwitterProto::UpdateSettings() for(HANDLE hContact = db_find_first(m_szModuleName); hContact; ) {
HANDLE hNext = db_find_next(hContact, m_szModuleName);
- if(db_get_b(hContact,m_szModuleName,"ChatRoom",0))
+ if(isChatRoom(hContact))
CallService(MS_DB_CONTACT_DELETE,reinterpret_cast<WPARAM>(hContact),0);
hContact = hNext;
}
diff --git a/protocols/WhatsApp/src/contacts.cpp b/protocols/WhatsApp/src/contacts.cpp index 2cdc0effc9..8ed8b0e918 100644 --- a/protocols/WhatsApp/src/contacts.cpp +++ b/protocols/WhatsApp/src/contacts.cpp @@ -8,7 +8,7 @@ bool WhatsAppProto::IsMyContact(HANDLE hContact, bool include_chat) if( include_chat )
return true;
- return getByte(hContact, "ChatRoom", 0) == 0;
+ return !isChatRoom(hContact);
}
return false;
@@ -131,7 +131,7 @@ HANDLE WhatsAppProto::ContactIDToHContact(const std::string& phoneNumber) if(!IsMyContact(hContact, true))
continue;
- const char* id = getByte(hContact, "ChatRoom", 0) > 0 ? idForChat : idForContact;
+ const char* id = isChatRoom(hContact) ? idForChat : idForContact;
DBVARIANT dbv;
if( !getString(hContact, id, &dbv))
diff --git a/protocols/Yahoo/src/chat.cpp b/protocols/Yahoo/src/chat.cpp index 11eb0e44f8..ae979eca78 100644 --- a/protocols/Yahoo/src/chat.cpp +++ b/protocols/Yahoo/src/chat.cpp @@ -1,8 +1,8 @@ /*
*
- * myYahoo Miranda Plugin
+ * myYahoo Miranda Plugin
*
- * Authors: Gennady Feldman (aka Gena01)
+ * Authors: Gennady Feldman (aka Gena01)
* Laurent Marechal (aka Peorth)
* Boris Krasnovskiy (aka borkra)
*
@@ -24,11 +24,11 @@ struct InviteChatParam char* room;
CYahooProto* ppro;
-
+
InviteChatParam(const char* room, CYahooProto* ppro)
: room(strdup(room)), ppro(ppro) {}
- ~InviteChatParam()
+ ~InviteChatParam()
{ free(room); }
};
@@ -38,7 +38,7 @@ struct InviteChatReqParam char* who;
TCHAR* msg;
CYahooProto* ppro;
-
+
InviteChatReqParam(const char* room, const char* who, const char* msg, CYahooProto* ppro)
: room(mir_strdup(room)), who(mir_strdup(who)), msg(mir_utf8decodeT(msg)), ppro(ppro) {}
@@ -146,7 +146,7 @@ void ext_yahoo_conf_message(int id, const char *me, const char *who, const char }
/* chat handlers */
-void ext_yahoo_chat_cat_xml(int id, const char *xml)
+void ext_yahoo_chat_cat_xml(int id, const char *xml)
{
}
@@ -168,11 +168,11 @@ void ext_yahoo_chat_message(int id, const char *me, const char *who, const char }
void ext_yahoo_chat_yahoologout(int id, const char *me)
-{
+{
LOG(("got chat logout"));
}
void ext_yahoo_chat_yahooerror(int id, const char *me)
-{
+{
LOG(("got chat error"));
}
@@ -279,7 +279,7 @@ void CYahooProto::ChatEvent(const char* room, const char* who, int evt, const TC mir_free(idt);
}
-int __cdecl CYahooProto::OnGCEventHook(WPARAM, LPARAM lParam)
+int __cdecl CYahooProto::OnGCEventHook(WPARAM, LPARAM lParam)
{
GCHOOK *gch = (GCHOOK*) lParam;
if (!gch) return 1;
@@ -289,7 +289,7 @@ int __cdecl CYahooProto::OnGCEventHook(WPARAM, LPARAM lParam) char* room = mir_t2a(gch->pDest->ptszID);
char* who = mir_t2a(gch->ptszUID);
- switch (gch->pDest->iType)
+ switch (gch->pDest->iType)
{
case GC_SESSION_TERMINATE:
{
@@ -303,7 +303,7 @@ int __cdecl CYahooProto::OnGCEventHook(WPARAM, LPARAM lParam) break;
case GC_USER_MESSAGE:
- if (gch->ptszText && gch->ptszText[0])
+ if (gch->ptszText && gch->ptszText[0])
{
char* msg = mir_utf8encodeT(gch->ptszText);
ChatRoom *cm = m_chatrooms.find((ChatRoom*)&room);
@@ -313,8 +313,8 @@ int __cdecl CYahooProto::OnGCEventHook(WPARAM, LPARAM lParam) }
break;
- case GC_USER_CHANMGR:
- DialogBoxParam(hInstance, MAKEINTRESOURCE(IDD_CHATROOM_INVITE), NULL, InviteToChatDialog,
+ case GC_USER_CHANMGR:
+ DialogBoxParam(hInstance, MAKEINTRESOURCE(IDD_CHATROOM_INVITE), NULL, InviteToChatDialog,
LPARAM(new InviteChatParam(room, this)));
break;
@@ -323,10 +323,10 @@ int __cdecl CYahooProto::OnGCEventHook(WPARAM, LPARAM lParam) break;
case GC_USER_LOGMENU:
- switch(gch->dwData)
+ switch(gch->dwData)
{
case 10:
- DialogBoxParam(hInstance, MAKEINTRESOURCE(IDD_CHATROOM_INVITE), NULL, InviteToChatDialog,
+ DialogBoxParam(hInstance, MAKEINTRESOURCE(IDD_CHATROOM_INVITE), NULL, InviteToChatDialog,
LPARAM(new InviteChatParam(room, this)));
break;
@@ -335,9 +335,9 @@ int __cdecl CYahooProto::OnGCEventHook(WPARAM, LPARAM lParam) break;
}
break;
-
- case GC_USER_NICKLISTMENU:
- switch (gch->dwData)
+
+ case GC_USER_NICKLISTMENU:
+ switch (gch->dwData)
{
case 10:
CallService(MS_USERINFO_SHOWDIALOG, (WPARAM)getbuddyH(who), 0);
@@ -353,7 +353,7 @@ int __cdecl CYahooProto::OnGCEventHook(WPARAM, LPARAM lParam) }
break;
- case GC_USER_TYPNOTIFY:
+ case GC_USER_TYPNOTIFY:
break;
}
mir_free(who);
@@ -362,15 +362,15 @@ int __cdecl CYahooProto::OnGCEventHook(WPARAM, LPARAM lParam) return 0;
}
-int __cdecl CYahooProto::OnGCMenuHook(WPARAM, LPARAM lParam)
+int __cdecl CYahooProto::OnGCMenuHook(WPARAM, LPARAM lParam)
{
GCMENUITEMS *gcmi = (GCMENUITEMS*) lParam;
if (gcmi == NULL || _stricmp(gcmi->pszModule, m_szModuleName)) return 0;
- if (gcmi->Type == MENU_ON_LOG)
+ if (gcmi->Type == MENU_ON_LOG)
{
- static const struct gc_item Items[] =
+ static const struct gc_item Items[] =
{
{ TranslateT("&Invite user..."), 10, MENU_ITEM, FALSE },
{ TranslateT("&Leave chat session"), 20, MENU_ITEM, FALSE }
@@ -378,12 +378,12 @@ int __cdecl CYahooProto::OnGCMenuHook(WPARAM, LPARAM lParam) gcmi->nItems = SIZEOF(Items);
gcmi->Item = (gc_item*)Items;
}
- else if (gcmi->Type == MENU_ON_NICKLIST)
+ else if (gcmi->Type == MENU_ON_NICKLIST)
{
char* id = mir_t2a(gcmi->pszUID);
- if (!_stricmp(m_yahoo_id, id))
+ if (!_stricmp(m_yahoo_id, id))
{
- static const struct gc_item Items[] =
+ static const struct gc_item Items[] =
{
{ TranslateT("User &details"), 10, MENU_ITEM, FALSE },
{ TranslateT("User &history"), 20, MENU_ITEM, FALSE },
@@ -393,9 +393,9 @@ int __cdecl CYahooProto::OnGCMenuHook(WPARAM, LPARAM lParam) gcmi->nItems = SIZEOF(Items);
gcmi->Item = (gc_item*)Items;
}
- else
+ else
{
- static const struct gc_item Items[] =
+ static const struct gc_item Items[] =
{
{ TranslateT("User &details"), 10, MENU_ITEM, FALSE },
{ TranslateT("User &history"), 20, MENU_ITEM, FALSE }
@@ -418,7 +418,7 @@ static void clist_chat_invite_send(HANDLE hItem, HWND hwndList, YList* &who, cha if (root)
hItem = (HANDLE)SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_ROOT, 0);
- while (hItem)
+ while (hItem)
{
if (IsHContactGroup(hItem))
{
@@ -437,7 +437,7 @@ static void clist_chat_invite_send(HANDLE hItem, HWND hwndList, YList* &who, cha who = y_list_append(who, mir_t2a(buf));
}
- else
+ else
{
DBVARIANT dbv;
if (!ppro->getString(hItem, YAHOO_LOGINID, &dbv))
@@ -454,12 +454,12 @@ static void clist_chat_invite_send(HANDLE hItem, HWND hwndList, YList* &who, cha CYahooProto::ChatRoom *cm = ppro->m_chatrooms.find((CYahooProto::ChatRoom*)&room);
if (cm)
{
- for (YList *l = who; l; l = l->next)
+ for (YList *l = who; l; l = l->next)
yahoo_conference_addinvite(ppro->m_id, NULL, (char*)l->data, room, cm->members, msg8);
}
else
yahoo_conference_invite(ppro->m_id, NULL, who, room, msg8);
-
+
mir_free(msg8);
for (YList *l = who; l; l = l->next) mir_free(l->data);
@@ -469,7 +469,7 @@ static void clist_chat_invite_send(HANDLE hItem, HWND hwndList, YList* &who, cha static void ClistValidateContact(HANDLE hItem, HWND hwndList, CYahooProto* ppro)
{
- if (!ppro->IsMyContact(hItem) || ppro->getByte(hItem, "ChatRoom", 0) ||
+ if (!ppro->IsMyContact(hItem) || ppro->isChatRoom(hItem) ||
ppro->getWord(hItem, "Status", ID_STATUS_OFFLINE) == ID_STATUS_ONTHEPHONE)
SendMessage(hwndList, CLM_DELETEITEM, (WPARAM)hItem, 0);
}
@@ -479,7 +479,7 @@ static void ClistChatPrepare(HANDLE hItem, HWND hwndList, CYahooProto* ppro) if (hItem == NULL)
hItem = (HANDLE)SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_ROOT, 0);
- while (hItem)
+ while (hItem)
{
HANDLE hItemN = (HANDLE)SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_NEXT, (LPARAM)hItem);
@@ -499,7 +499,7 @@ INT_PTR CALLBACK InviteToChatDialog(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA {
InviteChatParam* param = (InviteChatParam*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
- switch (msg)
+ switch (msg)
{
case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
@@ -529,17 +529,17 @@ INT_PTR CALLBACK InviteToChatDialog(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA NMCLISTCONTROL* nmc = (NMCLISTCONTROL*)lParam;
if (nmc->hdr.idFrom == IDC_CCLIST)
{
- switch (nmc->hdr.code)
+ switch (nmc->hdr.code)
{
case CLN_NEWCONTACT:
- if (param && (nmc->flags & (CLNF_ISGROUP | CLNF_ISINFO)) == 0)
+ if (param && (nmc->flags & (CLNF_ISGROUP | CLNF_ISINFO)) == 0)
ClistValidateContact(nmc->hItem, nmc->hdr.hwndFrom, param->ppro);
break;
case CLN_LISTREBUILT:
- if (param)
+ if (param)
ClistChatPrepare(NULL, nmc->hdr.hwndFrom, param->ppro);
- break;
+ break;
}
}
}
@@ -547,7 +547,7 @@ INT_PTR CALLBACK InviteToChatDialog(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA case WM_COMMAND:
{
- switch (LOWORD(wParam))
+ switch (LOWORD(wParam))
{
case IDC_ADDSCR:
if (param->ppro->m_bLoggedIn)
@@ -597,7 +597,7 @@ INT_PTR CALLBACK ChatRequestDialog(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM {
InviteChatReqParam* param = (InviteChatReqParam*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
- switch (msg)
+ switch (msg)
{
case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
@@ -620,13 +620,13 @@ INT_PTR CALLBACK ChatRequestDialog(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM case WM_NCDESTROY:
param->ppro->ReleaseIconEx("yahoo", true);
param->ppro->ReleaseIconEx("yahoo");
- delete param;
+ delete param;
break;
case WM_COMMAND:
{
CYahooProto::ChatRoom *cm = param->ppro->m_chatrooms.find((CYahooProto::ChatRoom*)¶m->room);
- switch (LOWORD(wParam))
+ switch (LOWORD(wParam))
{
case IDOK:
if (cm)
@@ -663,7 +663,7 @@ INT_PTR CALLBACK ChatRequestDialog(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM static void CALLBACK ConferenceRequestCB(PVOID pParam)
{
- CreateDialogParam(hInstance, MAKEINTRESOURCE(IDD_CHATROOM_INVITE_REQ),
+ CreateDialogParam(hInstance, MAKEINTRESOURCE(IDD_CHATROOM_INVITE_REQ),
NULL, ChatRequestDialog, (LPARAM)pParam);
}
@@ -671,10 +671,9 @@ INT_PTR __cdecl CYahooProto::CreateConference(WPARAM /*wParam*/, LPARAM /*lParam {
char room[128];
mir_snprintf(room, sizeof(room), "%s-%u", m_yahoo_id, time(NULL));
-
+
InviteChatParam* param = new InviteChatParam(room, this);
- DialogBoxParam(hInstance, MAKEINTRESOURCE(IDD_CHATROOM_INVITE), NULL,
+ DialogBoxParam(hInstance, MAKEINTRESOURCE(IDD_CHATROOM_INVITE), NULL,
InviteToChatDialog, LPARAM(param));
return 0;
}
-
|