diff options
Diffstat (limited to 'protocols')
43 files changed, 187 insertions, 187 deletions
diff --git a/protocols/AimOscar/src/services.cpp b/protocols/AimOscar/src/services.cpp index 64ac487fe9..24d9b1e33f 100644 --- a/protocols/AimOscar/src/services.cpp +++ b/protocols/AimOscar/src/services.cpp @@ -91,7 +91,7 @@ INT_PTR CAimProto::GetProfile(WPARAM wParam, LPARAM lParam) return 0;
DBVARIANT dbv;
- if (!getString((MCONTACT)wParam, AIM_KEY_SN, &dbv)) {
+ if (!getString(wParam, AIM_KEY_SN, &dbv)) {
request_HTML_profile = 1;
aim_query_profile(hServerConn, seqno, dbv.pszVal);
db_free(&dbv);
@@ -105,7 +105,7 @@ INT_PTR CAimProto::GetHTMLAwayMsg(WPARAM wParam, LPARAM /*lParam*/) return 0;
DBVARIANT dbv;
- if (!getString((MCONTACT)wParam, AIM_KEY_SN, &dbv))
+ if (!getString(wParam, AIM_KEY_SN, &dbv))
{
request_away_message = 1;
aim_query_away_message(hServerConn, seqno, dbv.pszVal);
@@ -119,7 +119,7 @@ int CAimProto::OnDbSettingChanged(WPARAM wParam,LPARAM lParam) if (strcmp(cws->szModule, MOD_KEY_CL) == 0 && state == 1 && wParam)
{
- MCONTACT hContact = (MCONTACT)wParam;
+ MCONTACT hContact = wParam;
if (strcmp(cws->szSetting, AIM_KEY_NL) == 0)
{
if (cws->value.type == DBVT_DELETED)
@@ -169,7 +169,7 @@ int CAimProto::OnContactDeleted(WPARAM wParam,LPARAM /*lParam*/) {
if (state != 1) return 0;
- MCONTACT hContact = (MCONTACT)wParam;
+ MCONTACT hContact = wParam;
if (db_get_b(hContact, MOD_KEY_CL, AIM_KEY_NL, 0))
return 0;
@@ -203,7 +203,7 @@ int CAimProto::OnGroupChange(WPARAM wParam,LPARAM lParam) {
if (state != 1 || !getByte(AIM_KEY_MG, 1)) return 0;
- MCONTACT hContact = (MCONTACT)wParam;
+ MCONTACT hContact = wParam;
CLISTGROUPCHANGE* grpchg = (CLISTGROUPCHANGE*)lParam;
if (hContact == NULL)
@@ -254,7 +254,7 @@ INT_PTR CAimProto::AddToServerList(WPARAM wParam, LPARAM /*lParam*/) {
if (state != 1) return 0;
- MCONTACT hContact = (MCONTACT)wParam;
+ MCONTACT hContact = wParam;
DBVARIANT dbv;
if (!db_get_utf(hContact, MOD_KEY_CL, OTH_KEY_GP, &dbv) && dbv.pszVal[0])
{
@@ -270,7 +270,7 @@ INT_PTR CAimProto::BlockBuddy(WPARAM wParam, LPARAM /*lParam*/) {
if (state != 1) return 0;
- MCONTACT hContact = (MCONTACT)wParam;
+ MCONTACT hContact = wParam;
unsigned short item_id;
DBVARIANT dbv;
if (getString(hContact, AIM_KEY_SN, &dbv)) return 0;
@@ -328,7 +328,7 @@ INT_PTR CAimProto::OnJoinChat(WPARAM wParam, LPARAM /*lParam*/) {
if (state != 1) return 0;
- MCONTACT hContact = (MCONTACT)wParam;
+ MCONTACT hContact = wParam;
DBVARIANT dbv;
if (!getString(hContact, "ChatRoomID", &dbv))
@@ -344,7 +344,7 @@ INT_PTR CAimProto::OnLeaveChat(WPARAM wParam, LPARAM /*lParam*/) {
if (state != 1) return 0;
- MCONTACT hContact = (MCONTACT)wParam;
+ MCONTACT hContact = wParam;
DBVARIANT dbv;
if (!getString(hContact, "ChatRoomID", &dbv))
diff --git a/protocols/AimOscar/src/theme.cpp b/protocols/AimOscar/src/theme.cpp index 57fdc2a032..d8c052591c 100644 --- a/protocols/AimOscar/src/theme.cpp +++ b/protocols/AimOscar/src/theme.cpp @@ -179,7 +179,7 @@ void InitExtraIcons(void) int CAimProto::OnPreBuildContactMenu(WPARAM wParam,LPARAM /*lParam*/)
{
- MCONTACT hContact = (MCONTACT)wParam;
+ MCONTACT hContact = wParam;
bool bIsChatRoom = isChatRoom(hContact);
//see if we should add the html away message context menu items
diff --git a/protocols/FacebookRM/src/chat.cpp b/protocols/FacebookRM/src/chat.cpp index 52b998ca06..99d4e96610 100644 --- a/protocols/FacebookRM/src/chat.cpp +++ b/protocols/FacebookRM/src/chat.cpp @@ -248,7 +248,7 @@ void FacebookProto::AddChat(const TCHAR *tid, const TCHAR *tname) INT_PTR FacebookProto::OnJoinChat(WPARAM wParam,LPARAM suppress)
{
- MCONTACT hContact = (MCONTACT)wParam;
+ MCONTACT hContact = wParam;
// TODO: load info from server + old history,...
diff --git a/protocols/GTalkExt/src/avatar.cpp b/protocols/GTalkExt/src/avatar.cpp index db6d5af883..4755c3da0a 100644 --- a/protocols/GTalkExt/src/avatar.cpp +++ b/protocols/GTalkExt/src/avatar.cpp @@ -107,11 +107,11 @@ VOID CALLBACK CallSetAvatar(PVOID lpParameter, BOOLEAN TimerOrWaitFired) int AvaChanged(WPARAM wParam, LPARAM lParam)
{
- if (!lParam && db_get_b((MCONTACT)wParam, SHORT_PLUGIN_NAME, PSEUDOCONTACT_FLAG, 0)) {
+ if (!lParam && db_get_b(wParam, SHORT_PLUGIN_NAME, PSEUDOCONTACT_FLAG, 0)) {
BOOL enqueued = FALSE;
AVACHANGED *ach = (AVACHANGED*)malloc(sizeof(AVACHANGED));
__try {
- ach->hContact = (MCONTACT)wParam;
+ ach->hContact = wParam;
enqueued = CreateTimerQueueTimer(&ach->hTimer, NULL, CallSetAvatar, ach, SET_AVATAR_INTERVAL, 0, WT_EXECUTEONLYONCE);
}
__finally {
diff --git a/protocols/GTalkExt/src/handlers.cpp b/protocols/GTalkExt/src/handlers.cpp index 6c35356762..8e31d7bf89 100644 --- a/protocols/GTalkExt/src/handlers.cpp +++ b/protocols/GTalkExt/src/handlers.cpp @@ -426,7 +426,7 @@ int OnExtListInit(WPARAM wParam, LPARAM lParam) int OnFilterPopup(WPARAM wParam, LPARAM lParam)
{
- MCONTACT hContact = (MCONTACT)wParam;
+ MCONTACT hContact = wParam;
if ( !db_get_b(hContact, SHORT_PLUGIN_NAME, PSEUDOCONTACT_FLAG, 0))
return 0;
diff --git a/protocols/Gadu-Gadu/src/core.cpp b/protocols/Gadu-Gadu/src/core.cpp index c6983d0665..886c8b2493 100644 --- a/protocols/Gadu-Gadu/src/core.cpp +++ b/protocols/Gadu-Gadu/src/core.cpp @@ -1272,7 +1272,7 @@ void GGPROTO::broadcastnewstatus(int newStatus) // When contact is deleted
int GGPROTO::contactdeleted(WPARAM wParam, LPARAM lParam)
{
- MCONTACT hContact = (MCONTACT)wParam;
+ MCONTACT hContact = wParam;
uin_t uin = (uin_t)getDword(hContact, GG_KEY_UIN, 0);
// Terminate conference if contact is deleted
@@ -1327,7 +1327,7 @@ static TCHAR* sttSettingToTchar( DBVARIANT* value ) int GGPROTO::dbsettingchanged(WPARAM wParam, LPARAM lParam)
{
DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING *) lParam;
- MCONTACT hContact = (MCONTACT)wParam;
+ MCONTACT hContact = wParam;
char *szProto = NULL;
debugLogA("dbsettingchanged(): fired. szModule=%s szSetting=%s", cws->szModule, cws->szSetting);
diff --git a/protocols/Gadu-Gadu/src/dialogs.cpp b/protocols/Gadu-Gadu/src/dialogs.cpp index b4745e0b8e..9ff5d0e216 100644 --- a/protocols/Gadu-Gadu/src/dialogs.cpp +++ b/protocols/Gadu-Gadu/src/dialogs.cpp @@ -704,7 +704,7 @@ static INT_PTR CALLBACK gg_detailsdlgproc(HWND hwndDlg, UINT msg, WPARAM wParam, TranslateDialogDefault(hwndDlg);
dat = (struct GGDETAILSDLGDATA *)mir_alloc(sizeof(struct GGDETAILSDLGDATA));
- dat->hContact = (MCONTACT)lParam;
+ dat->hContact = lParam;
dat->disableUpdate = FALSE;
dat->updating = FALSE;
SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)dat);
@@ -902,7 +902,7 @@ static INT_PTR CALLBACK gg_detailsdlgproc(HWND hwndDlg, UINT msg, WPARAM wParam, int GGPROTO::details_init(WPARAM wParam, LPARAM lParam)
{
- MCONTACT hContact = (MCONTACT)lParam;
+ MCONTACT hContact = lParam;
char* pszTemplate;
if (hContact == NULL){
diff --git a/protocols/Gadu-Gadu/src/gg.cpp b/protocols/Gadu-Gadu/src/gg.cpp index e340b6703b..46d93a75b8 100644 --- a/protocols/Gadu-Gadu/src/gg.cpp +++ b/protocols/Gadu-Gadu/src/gg.cpp @@ -213,7 +213,7 @@ static GGPROTO* gg_getprotoinstance(MCONTACT hContact) // Handles PrebuildContactMenu event
static int gg_prebuildcontactmenu(WPARAM wParam, LPARAM lParam)
{
- const MCONTACT hContact = (MCONTACT)wParam;
+ const MCONTACT hContact = wParam;
GGPROTO* gg = gg_getprotoinstance(hContact);
if (gg == NULL)
return 0;
@@ -232,7 +232,7 @@ static int gg_prebuildcontactmenu(WPARAM wParam, LPARAM lParam) // Contact block service function
INT_PTR GGPROTO::blockuser(WPARAM wParam, LPARAM lParam)
{
- const MCONTACT hContact = (MCONTACT)wParam;
+ const MCONTACT hContact = wParam;
setByte(hContact, GG_KEY_BLOCK, !getByte(hContact, GG_KEY_BLOCK, 0));
notifyuser(hContact, 1);
return 0;
diff --git a/protocols/Gadu-Gadu/src/image.cpp b/protocols/Gadu-Gadu/src/image.cpp index be57084318..5c874800db 100644 --- a/protocols/Gadu-Gadu/src/image.cpp +++ b/protocols/Gadu-Gadu/src/image.cpp @@ -1173,7 +1173,7 @@ BOOL GGPROTO::img_sendonrequest(gg_event* e) INT_PTR GGPROTO::img_sendimg(WPARAM wParam, LPARAM lParam)
{
- MCONTACT hContact = (MCONTACT)wParam;
+ MCONTACT hContact = wParam;
GGIMAGEDLGDATA *dat = NULL;
gg_EnterCriticalSection(&img_mutex, "img_sendimg", 64, "img_mutex", 1);
diff --git a/protocols/Gadu-Gadu/src/services.cpp b/protocols/Gadu-Gadu/src/services.cpp index cac6119d71..67afbfcf27 100644 --- a/protocols/Gadu-Gadu/src/services.cpp +++ b/protocols/Gadu-Gadu/src/services.cpp @@ -382,7 +382,7 @@ INT_PTR GGPROTO::get_acc_mgr_gui(WPARAM wParam, LPARAM lParam) INT_PTR GGPROTO::leavechat(WPARAM wParam, LPARAM lParam)
{
- MCONTACT hContact = (MCONTACT)wParam;
+ MCONTACT hContact = wParam;
if (hContact)
CallService(MS_DB_CONTACT_DELETE, (WPARAM)hContact, 0);
diff --git a/protocols/IRCG/src/services.cpp b/protocols/IRCG/src/services.cpp index 647ece9070..b4b680b455 100644 --- a/protocols/IRCG/src/services.cpp +++ b/protocols/IRCG/src/services.cpp @@ -105,25 +105,25 @@ static CIrcProto* IrcGetInstanceByHContact(MCONTACT hContact) static INT_PTR IrcMenuChanSettings(WPARAM wParam, LPARAM lParam)
{
- CIrcProto *ppro = IrcGetInstanceByHContact((MCONTACT)wParam);
+ CIrcProto *ppro = IrcGetInstanceByHContact(wParam);
return (ppro) ? ppro->OnMenuChanSettings(wParam, lParam) : 0;
}
static INT_PTR IrcMenuWhois(WPARAM wParam, LPARAM lParam)
{
- CIrcProto *ppro = IrcGetInstanceByHContact((MCONTACT)wParam);
+ CIrcProto *ppro = IrcGetInstanceByHContact(wParam);
return (ppro) ? ppro->OnMenuWhois(wParam, lParam) : 0;
}
static INT_PTR IrcMenuDisconnect(WPARAM wParam, LPARAM lParam)
{
- CIrcProto *ppro = IrcGetInstanceByHContact((MCONTACT)wParam);
+ CIrcProto *ppro = IrcGetInstanceByHContact(wParam);
return (ppro) ? ppro->OnMenuDisconnect(wParam, lParam) : 0;
}
static INT_PTR IrcMenuIgnore(WPARAM wParam, LPARAM lParam)
{
- CIrcProto *ppro = IrcGetInstanceByHContact((MCONTACT)wParam);
+ CIrcProto *ppro = IrcGetInstanceByHContact(wParam);
return (ppro) ? ppro->OnMenuIgnore(wParam, lParam) : 0;
}
@@ -134,7 +134,7 @@ int IrcPrebuildContactMenu(WPARAM wParam, LPARAM lParam) Menu_ShowItem(hUMenuDisconnect, false);
Menu_ShowItem(hUMenuIgnore, false);
- CIrcProto *ppro = IrcGetInstanceByHContact((MCONTACT)wParam);
+ CIrcProto *ppro = IrcGetInstanceByHContact(wParam);
return (ppro) ? ppro->OnMenuPreBuild(wParam, lParam) : 0;
}
@@ -934,7 +934,7 @@ int __cdecl CIrcProto::OnPreShutdown(WPARAM, LPARAM) int __cdecl CIrcProto::OnMenuPreBuild(WPARAM wParam, LPARAM)
{
DBVARIANT dbv;
- MCONTACT hContact = (MCONTACT)wParam;
+ MCONTACT hContact = wParam;
if (hContact == NULL)
return 0;
@@ -978,7 +978,7 @@ int __cdecl CIrcProto::OnMenuPreBuild(WPARAM wParam, LPARAM) int __cdecl CIrcProto::OnDbSettingChanged(WPARAM wParam, LPARAM lParam)
{
- MCONTACT hContact = (MCONTACT)wParam;
+ MCONTACT hContact = wParam;
if (hContact == NULL || !IsConnected())
return 0;
diff --git a/protocols/IRCG/src/userinfo.cpp b/protocols/IRCG/src/userinfo.cpp index 246e6be8e1..38ea133fb6 100644 --- a/protocols/IRCG/src/userinfo.cpp +++ b/protocols/IRCG/src/userinfo.cpp @@ -45,7 +45,7 @@ INT_PTR CALLBACK UserDetailsDlgProc(HWND m_hwnd, UINT msg, WPARAM wParam, LPARAM UserDetailsDlgProcParam *p = (UserDetailsDlgProcParam*)GetWindowLongPtr(m_hwnd, GWLP_USERDATA);
switch (msg) {
case WM_INITDIALOG:
- p = new UserDetailsDlgProcParam(NULL, (MCONTACT)lParam);
+ p = new UserDetailsDlgProcParam(NULL, lParam);
SetWindowLongPtr(m_hwnd, GWLP_USERDATA, (LPARAM)p);
break;
@@ -188,7 +188,7 @@ INT_PTR CALLBACK UserDetailsDlgProc(HWND m_hwnd, UINT msg, WPARAM wParam, LPARAM int __cdecl CIrcProto::OnInitUserInfo(WPARAM wParam, LPARAM lParam)
{
- MCONTACT hContact = (MCONTACT)lParam;
+ MCONTACT hContact = lParam;
char *szProto = GetContactProto(hContact);
if (!hContact || !szProto || lstrcmpiA(szProto, m_szModuleName))
return 0;
diff --git a/protocols/IcqOscarJ/src/UI/askauthentication.cpp b/protocols/IcqOscarJ/src/UI/askauthentication.cpp index 91fe8e75d2..be0b18af78 100644 --- a/protocols/IcqOscarJ/src/UI/askauthentication.cpp +++ b/protocols/IcqOscarJ/src/UI/askauthentication.cpp @@ -90,7 +90,7 @@ static INT_PTR CALLBACK AskAuthProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA INT_PTR CIcqProto::RequestAuthorization(WPARAM wParam, LPARAM lParam)
{
- AskAuthParam param = { this, (MCONTACT)wParam };
+ AskAuthParam param = { this, wParam };
DialogBoxParam(hInst, MAKEINTRESOURCE(IDD_ASKAUTH), NULL, AskAuthProc, (LPARAM)¶m);
return 0;
}
diff --git a/protocols/IcqOscarJ/src/UI/userinfotab.cpp b/protocols/IcqOscarJ/src/UI/userinfotab.cpp index 793aa0d04d..a70d2d49e5 100644 --- a/protocols/IcqOscarJ/src/UI/userinfotab.cpp +++ b/protocols/IcqOscarJ/src/UI/userinfotab.cpp @@ -284,7 +284,7 @@ static INT_PTR CALLBACK IcqDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM int CIcqProto::OnUserInfoInit(WPARAM wParam, LPARAM lParam)
{
- if ((!IsICQContact((MCONTACT)lParam)) && lParam)
+ if ((!IsICQContact(lParam)) && lParam)
return 0;
OPTIONSDIALOGPAGE odp = { sizeof(odp) };
diff --git a/protocols/IcqOscarJ/src/icq_menu.cpp b/protocols/IcqOscarJ/src/icq_menu.cpp index f06e5eea20..b23bed9fd5 100644 --- a/protocols/IcqOscarJ/src/icq_menu.cpp +++ b/protocols/IcqOscarJ/src/icq_menu.cpp @@ -54,37 +54,37 @@ static CIcqProto* IcqGetInstanceByHContact(MCONTACT hContact) static INT_PTR IcqMenuHandleRequestAuth(WPARAM wParam, LPARAM lParam)
{
- CIcqProto* ppro = IcqGetInstanceByHContact((MCONTACT)wParam);
+ CIcqProto* ppro = IcqGetInstanceByHContact(wParam);
return (ppro) ? ppro->RequestAuthorization(wParam, lParam) : 0;
}
static INT_PTR IcqMenuHandleGrantAuth(WPARAM wParam, LPARAM lParam)
{
- CIcqProto* ppro = IcqGetInstanceByHContact((MCONTACT)wParam);
+ CIcqProto* ppro = IcqGetInstanceByHContact(wParam);
return (ppro) ? ppro->GrantAuthorization(wParam, lParam) : 0;
}
static INT_PTR IcqMenuHandleRevokeAuth(WPARAM wParam, LPARAM lParam)
{
- CIcqProto* ppro = IcqGetInstanceByHContact((MCONTACT)wParam);
+ CIcqProto* ppro = IcqGetInstanceByHContact(wParam);
return (ppro) ? ppro->RevokeAuthorization(wParam, lParam) : 0;
}
static INT_PTR IcqMenuHandleAddServContact(WPARAM wParam, LPARAM lParam)
{
- CIcqProto* ppro = IcqGetInstanceByHContact((MCONTACT)wParam);
+ CIcqProto* ppro = IcqGetInstanceByHContact(wParam);
return (ppro) ? ppro->AddServerContact(wParam, lParam) : 0;
}
static INT_PTR IcqMenuHandleXStatusDetails(WPARAM wParam, LPARAM lParam)
{
- CIcqProto* ppro = IcqGetInstanceByHContact((MCONTACT)wParam);
+ CIcqProto* ppro = IcqGetInstanceByHContact(wParam);
return (ppro) ? ppro->ShowXStatusDetails(wParam, lParam) : 0;
}
static INT_PTR IcqMenuHandleOpenProfile(WPARAM wParam, LPARAM lParam)
{
- CIcqProto* ppro = IcqGetInstanceByHContact((MCONTACT)wParam);
+ CIcqProto* ppro = IcqGetInstanceByHContact(wParam);
return (ppro) ? ppro->OpenWebProfile(wParam, lParam) : 0;
}
@@ -97,7 +97,7 @@ static int IcqPrebuildContactMenu( WPARAM wParam, LPARAM lParam ) Menu_ShowItem(g_hContactMenuItems[ICMI_XSTATUS_DETAILS], FALSE);
Menu_ShowItem(g_hContactMenuItems[ICMI_OPEN_PROFILE], FALSE);
- CIcqProto* ppro = IcqGetInstanceByHContact((MCONTACT)wParam);
+ CIcqProto* ppro = IcqGetInstanceByHContact(wParam);
return (ppro) ? ppro->OnPreBuildContactMenu(wParam, lParam) : 0;
}
@@ -177,7 +177,7 @@ void g_MenuUninit(void) INT_PTR CIcqProto::OpenWebProfile(WPARAM wParam, LPARAM lParam)
{
- MCONTACT hContact = (MCONTACT)wParam;
+ MCONTACT hContact = wParam;
DWORD dwUin = getContactUin(hContact);
char url[256];
mir_snprintf(url, sizeof(url), "http://www.icq.com/people/%d",dwUin);
@@ -187,7 +187,7 @@ INT_PTR CIcqProto::OpenWebProfile(WPARAM wParam, LPARAM lParam) int CIcqProto::OnPreBuildContactMenu(WPARAM wParam, LPARAM)
{
- MCONTACT hContact = (MCONTACT)wParam;
+ MCONTACT hContact = wParam;
if (hContact == NULL)
return 0;
diff --git a/protocols/IcqOscarJ/src/icq_servlist.cpp b/protocols/IcqOscarJ/src/icq_servlist.cpp index e103094c57..71745e80a6 100644 --- a/protocols/IcqOscarJ/src/icq_servlist.cpp +++ b/protocols/IcqOscarJ/src/icq_servlist.cpp @@ -2593,14 +2593,14 @@ int CIcqProto::ServListDbSettingChanged(WPARAM wParam, LPARAM lParam) if (!strcmpnull(cws->szSetting, "MyHandle") &&
getByte("StoreServerDetails", DEFAULT_SS_STORE))
{ // Update contact's details in server-list
- servlistUpdateContact((MCONTACT)wParam);
+ servlistUpdateContact(wParam);
}
// Has contact been moved to another group?
if (!strcmpnull(cws->szSetting, "Group") &&
getByte("StoreServerDetails", DEFAULT_SS_STORE))
{ // Read group from DB
- char* szNewGroup = getContactCListGroup((MCONTACT)wParam);
+ char* szNewGroup = getContactCListGroup(wParam);
SAFE_FREE(&szNewGroup);
}
@@ -2610,7 +2610,7 @@ int CIcqProto::ServListDbSettingChanged(WPARAM wParam, LPARAM lParam) if (!strcmpnull(cws->szSetting, "MyNotes") &&
getByte("StoreServerDetails", DEFAULT_SS_STORE))
{ // Update contact's details in server-list
- servlistUpdateContact((MCONTACT)wParam);
+ servlistUpdateContact(wParam);
}
}
@@ -2624,17 +2624,17 @@ int CIcqProto::ServListDbContactDeleted(WPARAM wParam, LPARAM lParam) debugLogA("DB-Events: Contact %x deleted.", wParam);
#endif
- DeleteFromContactsCache((MCONTACT)wParam);
+ DeleteFromContactsCache(wParam);
if ( !icqOnline() && m_bSsiEnabled)
{ // contact was deleted only locally - retrieve full list on next connect
- setWord((MCONTACT)wParam, "SrvRecordCount", 0);
+ setWord(wParam, "SrvRecordCount", 0);
}
if ( !icqOnline() || !m_bSsiEnabled)
return 0;
- MCONTACT hContact = (MCONTACT)wParam;
+ MCONTACT hContact = wParam;
// we need all server contacts on local buddy list
DWORD dwUIN;
@@ -2674,7 +2674,7 @@ int CIcqProto::ServListDbContactDeleted(WPARAM wParam, LPARAM lParam) int CIcqProto::ServListCListGroupChange(WPARAM wParam, LPARAM lParam)
{
- MCONTACT hContact = (MCONTACT)wParam;
+ MCONTACT hContact = wParam;
CLISTGROUPCHANGE *grpchg = (CLISTGROUPCHANGE*)lParam;
if (!icqOnline() || !m_bSsiEnabled || bIsSyncingCL)
diff --git a/protocols/IcqOscarJ/src/icq_xstatus.cpp b/protocols/IcqOscarJ/src/icq_xstatus.cpp index 231293a139..4f14141bc0 100644 --- a/protocols/IcqOscarJ/src/icq_xstatus.cpp +++ b/protocols/IcqOscarJ/src/icq_xstatus.cpp @@ -912,7 +912,7 @@ INT_PTR CIcqProto::ShowXStatusDetails(WPARAM wParam, LPARAM lParam) InitXStatusData init;
init.ppro = this;
init.bAction = 1; // retrieve
- init.hContact = (MCONTACT)wParam;
+ init.hContact = wParam;
CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_SETXSTATUS), NULL, SetXStatusDlgProc, (LPARAM)&init);
return 0;
@@ -971,7 +971,7 @@ INT_PTR CIcqProto::SetXStatusEx(WPARAM wParam, LPARAM lParam) INT_PTR CIcqProto::GetXStatusEx(WPARAM wParam, LPARAM lParam)
{
CUSTOM_STATUS *pData = (CUSTOM_STATUS*)lParam;
- MCONTACT hContact = (MCONTACT)wParam;
+ MCONTACT hContact = wParam;
if (!m_bXStatusEnabled && !m_bMoodsEnabled) return 1;
@@ -1088,7 +1088,7 @@ INT_PTR CIcqProto::GetXStatusIcon(WPARAM wParam, LPARAM lParam) INT_PTR CIcqProto::RequestXStatusDetails(WPARAM wParam, LPARAM lParam)
{
- MCONTACT hContact = (MCONTACT)wParam;
+ MCONTACT hContact = wParam;
if (!m_bXStatusEnabled)
return 0;
@@ -1105,7 +1105,7 @@ INT_PTR CIcqProto::RequestAdvStatusIconIdx(WPARAM wParam, LPARAM lParam) if (!m_bXStatusEnabled && !m_bMoodsEnabled)
return -1;
- BYTE bXStatus = getContactXStatus((MCONTACT)wParam);
+ BYTE bXStatus = getContactXStatus(wParam);
if (bXStatus) {
if (!bXStatusCListIconsValid[bXStatus-1]) { // adding icon
int idx = hXStatusCListIcons[bXStatus-1];
diff --git a/protocols/IcqOscarJ/src/icqosc_svcs.cpp b/protocols/IcqOscarJ/src/icqosc_svcs.cpp index 69df16b526..d70f103374 100644 --- a/protocols/IcqOscarJ/src/icqosc_svcs.cpp +++ b/protocols/IcqOscarJ/src/icqosc_svcs.cpp @@ -38,12 +38,12 @@ INT_PTR CIcqProto::AddServerContact(WPARAM wParam, LPARAM lParam) if (!m_bSsiEnabled) return 0;
// Does this contact have a UID?
- if (!getContactUid((MCONTACT)wParam, &dwUin, &szUid) && !getWord((MCONTACT)wParam, DBSETTING_SERVLIST_ID, 0) && !getWord((MCONTACT)wParam, DBSETTING_SERVLIST_IGNORE, 0))
+ if (!getContactUid(wParam, &dwUin, &szUid) && !getWord(wParam, DBSETTING_SERVLIST_ID, 0) && !getWord(wParam, DBSETTING_SERVLIST_IGNORE, 0))
{ /// TODO: remove possible 0x6A TLV in contact server-list data!!!
// Read group from DB
- char *pszGroup = getContactCListGroup((MCONTACT)wParam);
+ char *pszGroup = getContactCListGroup(wParam);
- servlistAddContact((MCONTACT)wParam, pszGroup);
+ servlistAddContact(wParam, pszGroup);
SAFE_FREE((void**)&pszGroup);
}
return 0;
@@ -88,7 +88,7 @@ INT_PTR CIcqProto::GetInfoSetting(WPARAM wParam, LPARAM lParam) {
DBCONTACTGETSETTING *cgs = (DBCONTACTGETSETTING*)lParam;
BYTE type = cgs->pValue->type;
- INT_PTR rc = db_get_s((MCONTACT)wParam, cgs->szModule, cgs->szSetting, cgs->pValue, 0);
+ INT_PTR rc = db_get_s(wParam, cgs->szModule, cgs->szSetting, cgs->pValue, 0);
if (rc)
return rc;
@@ -458,13 +458,13 @@ INT_PTR CIcqProto::GrantAuthorization(WPARAM wParam, LPARAM lParam) DWORD dwUin;
uid_str szUid;
- if (getContactUid((MCONTACT)wParam, &dwUin, &szUid))
+ if (getContactUid(wParam, &dwUin, &szUid))
return 0; // Invalid contact
// send without reason, do we need any ?
icq_sendGrantAuthServ(dwUin, szUid, NULL);
// auth granted, remove contact menu item
- delSetting((MCONTACT)wParam, "Grant");
+ delSetting(wParam, "Grant");
}
return 0;
@@ -494,7 +494,7 @@ INT_PTR CIcqProto::RevokeAuthorization(WPARAM wParam, LPARAM lParam) DWORD dwUin;
uid_str szUid;
- if (getContactUid((MCONTACT)wParam, &dwUin, &szUid))
+ if (getContactUid(wParam, &dwUin, &szUid))
return 0; // Invalid contact
if (MessageBox(NULL, TranslateT("Are you sure you want to revoke user's authorization?\nThis will remove you from his/her list on some clients."), TranslateT("Confirmation"), MB_ICONQUESTION | MB_YESNO) != IDYES)
@@ -714,7 +714,7 @@ INT_PTR __cdecl CIcqProto::IcqCheckCapability(WPARAM wParam, LPARAM lParam) {
int res = 0;
DBVARIANT dbvariant;
- MCONTACT hContact = (MCONTACT)wParam;
+ MCONTACT hContact = wParam;
ICQ_CUSTOMCAP *icqCustomCap = (ICQ_CUSTOMCAP *)lParam;
db_get(hContact, m_szModuleName, "CapBuf", &dbvariant);
diff --git a/protocols/JabberG/src/jabber_adhoc.cpp b/protocols/JabberG/src/jabber_adhoc.cpp index 2e0df413f3..052f2d9692 100644 --- a/protocols/JabberG/src/jabber_adhoc.cpp +++ b/protocols/JabberG/src/jabber_adhoc.cpp @@ -510,7 +510,7 @@ static INT_PTR CALLBACK JabberAdHoc_CommandDlgProc(HWND hwndDlg, UINT msg, WPARA int __cdecl CJabberProto::ContactMenuRunCommands(WPARAM wParam, LPARAM lParam)
{
- MCONTACT hContact = (MCONTACT)wParam;
+ MCONTACT hContact = wParam;
int res = -1;
if ((hContact != NULL || lParam != 0) && m_bJabberOnline) {
diff --git a/protocols/JabberG/src/jabber_events.cpp b/protocols/JabberG/src/jabber_events.cpp index 4fb8a4a3c1..594224512b 100644 --- a/protocols/JabberG/src/jabber_events.cpp +++ b/protocols/JabberG/src/jabber_events.cpp @@ -36,7 +36,7 @@ int CJabberProto::OnContactDeleted(WPARAM wParam, LPARAM) if (!m_bJabberOnline) // should never happen
return 0;
- MCONTACT hContact = (MCONTACT)wParam;
+ MCONTACT hContact = wParam;
ptrT jid(getTStringA(hContact, isChatRoom(hContact) ? "ChatRoomID" : "jid"));
if (jid == NULL)
return 0;
@@ -159,7 +159,7 @@ void __cdecl CJabberProto::OnAddContactForever(DBCONTACTWRITESETTING *cws, MCONT int __cdecl CJabberProto::OnDbSettingChanged(WPARAM wParam, LPARAM lParam)
{
- MCONTACT hContact = (MCONTACT)wParam;
+ MCONTACT hContact = wParam;
if (hContact == NULL || !m_bJabberOnline)
return 0;
diff --git a/protocols/JabberG/src/jabber_groupchat.cpp b/protocols/JabberG/src/jabber_groupchat.cpp index bbf4cae4f7..0e8d20f019 100644 --- a/protocols/JabberG/src/jabber_groupchat.cpp +++ b/protocols/JabberG/src/jabber_groupchat.cpp @@ -185,7 +185,7 @@ INT_PTR __cdecl CJabberProto::OnMenuHandleJoinGroupchat(WPARAM, LPARAM) INT_PTR __cdecl CJabberProto::OnJoinChat(WPARAM wParam, LPARAM)
{
- MCONTACT hContact = (MCONTACT)wParam;
+ MCONTACT hContact = wParam;
ptrT jid( getTStringA(hContact, "ChatRoomID"));
if (jid == NULL)
return 0;
@@ -210,7 +210,7 @@ INT_PTR __cdecl CJabberProto::OnJoinChat(WPARAM wParam, LPARAM) INT_PTR __cdecl CJabberProto::OnLeaveChat(WPARAM wParam, LPARAM)
{
- MCONTACT hContact = (MCONTACT)wParam;
+ MCONTACT hContact = wParam;
ptrT jid(getTStringA(hContact, "ChatRoomID"));
if (jid != NULL) {
if (getWord(hContact, "Status", 0) != ID_STATUS_OFFLINE) {
diff --git a/protocols/JabberG/src/jabber_icolib.cpp b/protocols/JabberG/src/jabber_icolib.cpp index 53491363bd..b535cb0d47 100644 --- a/protocols/JabberG/src/jabber_icolib.cpp +++ b/protocols/JabberG/src/jabber_icolib.cpp @@ -393,7 +393,7 @@ int CJabberProto::OnReloadIcons(WPARAM, LPARAM) INT_PTR __cdecl CJabberProto::JGetAdvancedStatusIcon(WPARAM wParam, LPARAM)
{
- MCONTACT hContact = (MCONTACT)wParam;
+ MCONTACT hContact = wParam;
if (!hContact)
return -1;
diff --git a/protocols/JabberG/src/jabber_menu.cpp b/protocols/JabberG/src/jabber_menu.cpp index c816f155e1..066a03f2a1 100644 --- a/protocols/JabberG/src/jabber_menu.cpp +++ b/protocols/JabberG/src/jabber_menu.cpp @@ -88,73 +88,73 @@ static CJabberProto* JabberGetInstanceByHContact(MCONTACT hContact) static INT_PTR JabberMenuHandleRequestAuth(WPARAM wParam, LPARAM lParam)
{
- CJabberProto *ppro = JabberGetInstanceByHContact((MCONTACT)wParam);
+ CJabberProto *ppro = JabberGetInstanceByHContact(wParam);
return(ppro) ? ppro->OnMenuHandleRequestAuth(wParam, lParam) : 0;
}
static INT_PTR JabberMenuHandleGrantAuth(WPARAM wParam, LPARAM lParam)
{
- CJabberProto *ppro = JabberGetInstanceByHContact((MCONTACT)wParam);
+ CJabberProto *ppro = JabberGetInstanceByHContact(wParam);
return(ppro) ? ppro->OnMenuHandleGrantAuth(wParam, lParam) : 0;
}
static INT_PTR JabberMenuRevokeAuth(WPARAM wParam, LPARAM lParam)
{
- CJabberProto *ppro = JabberGetInstanceByHContact((MCONTACT)wParam);
+ CJabberProto *ppro = JabberGetInstanceByHContact(wParam);
return(ppro) ? ppro->OnMenuRevokeAuth(wParam, lParam) : 0;
}
static INT_PTR JabberMenuConvertChatContact(WPARAM wParam, LPARAM lParam)
{
- CJabberProto *ppro = JabberGetInstanceByHContact((MCONTACT)wParam);
+ CJabberProto *ppro = JabberGetInstanceByHContact(wParam);
return(ppro) ? ppro->OnMenuConvertChatContact(wParam, lParam) : 0;
}
static INT_PTR JabberMenuRosterAdd(WPARAM wParam, LPARAM lParam)
{
- CJabberProto *ppro = JabberGetInstanceByHContact((MCONTACT)wParam);
+ CJabberProto *ppro = JabberGetInstanceByHContact(wParam);
return(ppro) ? ppro->OnMenuRosterAdd(wParam, lParam) : 0;
}
static INT_PTR JabberMenuBookmarkAdd(WPARAM wParam, LPARAM lParam)
{
- CJabberProto *ppro = JabberGetInstanceByHContact((MCONTACT)wParam);
+ CJabberProto *ppro = JabberGetInstanceByHContact(wParam);
return(ppro) ? ppro->OnMenuBookmarkAdd(wParam, lParam) : 0;
}
static INT_PTR JabberMenuTransportLogin(WPARAM wParam, LPARAM lParam)
{
- CJabberProto *ppro = JabberGetInstanceByHContact((MCONTACT)wParam);
+ CJabberProto *ppro = JabberGetInstanceByHContact(wParam);
return(ppro) ? ppro->OnMenuTransportLogin(wParam, lParam) : 0;
}
static INT_PTR JabberMenuTransportResolve(WPARAM wParam, LPARAM lParam)
{
- CJabberProto *ppro = JabberGetInstanceByHContact((MCONTACT)wParam);
+ CJabberProto *ppro = JabberGetInstanceByHContact(wParam);
return(ppro) ? ppro->OnMenuTransportResolve(wParam, lParam) : 0;
}
static INT_PTR JabberContactMenuRunCommands(WPARAM wParam, LPARAM lParam)
{
- CJabberProto *ppro = JabberGetInstanceByHContact((MCONTACT)wParam);
+ CJabberProto *ppro = JabberGetInstanceByHContact(wParam);
return(ppro) ? ppro->ContactMenuRunCommands(wParam, lParam) : 0;
}
static INT_PTR JabberMenuSendNote(WPARAM wParam, LPARAM lParam)
{
- CJabberProto *ppro = JabberGetInstanceByHContact((MCONTACT)wParam);
+ CJabberProto *ppro = JabberGetInstanceByHContact(wParam);
return(ppro) ? ppro->OnMenuSendNote(wParam, lParam) : 0;
}
static INT_PTR JabberMenuHandleResource(WPARAM wParam, LPARAM lParam, LPARAM lRes)
{
- CJabberProto *ppro = JabberGetInstanceByHContact((MCONTACT)wParam);
+ CJabberProto *ppro = JabberGetInstanceByHContact(wParam);
return(ppro) ? ppro->OnMenuHandleResource(wParam, lParam, lRes) : 0;
}
static INT_PTR JabberMenuHandleDirectPresence(WPARAM wParam, LPARAM lParam, LPARAM lRes)
{
- CJabberProto *ppro = JabberGetInstanceByHContact((MCONTACT)wParam);
+ CJabberProto *ppro = JabberGetInstanceByHContact(wParam);
return(ppro) ? ppro->OnMenuHandleDirectPresence(wParam, lParam, lRes) : 0;
}
@@ -173,7 +173,7 @@ static int JabberPrebuildContactMenu(WPARAM wParam, LPARAM lParam) Menu_ShowItem(g_hMenuResourcesRoot, FALSE);
Menu_ShowItem(g_hMenuDirectPresence[0], FALSE);
- CJabberProto *ppro = JabberGetInstanceByHContact((MCONTACT)wParam);
+ CJabberProto *ppro = JabberGetInstanceByHContact(wParam);
return(ppro) ? ppro->OnPrebuildContactMenu(wParam, lParam) : 0;
}
@@ -347,7 +347,7 @@ void g_MenuUninit(void) int CJabberProto::OnPrebuildContactMenu(WPARAM wParam, LPARAM)
{
- MCONTACT hContact = (MCONTACT)wParam;
+ MCONTACT hContact = wParam;
if (hContact == NULL)
return 0;
@@ -479,7 +479,7 @@ int CJabberProto::OnPrebuildContactMenu(WPARAM wParam, LPARAM) INT_PTR __cdecl CJabberProto::OnMenuConvertChatContact(WPARAM wParam, LPARAM)
{
- MCONTACT hContact = (MCONTACT)wParam;
+ MCONTACT hContact = wParam;
BYTE bIsChatRoom = isChatRoom(hContact);
const char *szSetting = (bIsChatRoom) ? "ChatRoomID" : "jid";
@@ -494,7 +494,7 @@ INT_PTR __cdecl CJabberProto::OnMenuConvertChatContact(WPARAM wParam, LPARAM) INT_PTR __cdecl CJabberProto::OnMenuRosterAdd(WPARAM wParam, LPARAM)
{
- MCONTACT hContact = (MCONTACT)wParam;
+ MCONTACT hContact = wParam;
if (!hContact)
return 0; // we do not add ourself to the roster. (buggy situation - should not happen)
@@ -524,7 +524,7 @@ INT_PTR __cdecl CJabberProto::OnMenuRosterAdd(WPARAM wParam, LPARAM) INT_PTR __cdecl CJabberProto::OnMenuHandleRequestAuth(WPARAM wParam, LPARAM)
{
- MCONTACT hContact = (MCONTACT)wParam;
+ MCONTACT hContact = wParam;
if (hContact != NULL && m_bJabberOnline) {
ptrT jid(getTStringA(hContact, "jid"));
if (jid != NULL)
@@ -535,7 +535,7 @@ INT_PTR __cdecl CJabberProto::OnMenuHandleRequestAuth(WPARAM wParam, LPARAM) INT_PTR __cdecl CJabberProto::OnMenuHandleGrantAuth(WPARAM wParam, LPARAM)
{
- MCONTACT hContact = (MCONTACT)wParam;
+ MCONTACT hContact = wParam;
if (hContact != NULL && m_bJabberOnline) {
ptrT jid(getTStringA(hContact, "jid"));
if (jid != NULL)
@@ -546,7 +546,7 @@ INT_PTR __cdecl CJabberProto::OnMenuHandleGrantAuth(WPARAM wParam, LPARAM) INT_PTR __cdecl CJabberProto::OnMenuRevokeAuth(WPARAM wParam, LPARAM)
{
- MCONTACT hContact = (MCONTACT)wParam;
+ MCONTACT hContact = wParam;
if (hContact != NULL && m_bJabberOnline) {
ptrT jid(getTStringA(hContact, "jid"));
if (jid != NULL)
@@ -557,7 +557,7 @@ INT_PTR __cdecl CJabberProto::OnMenuRevokeAuth(WPARAM wParam, LPARAM) INT_PTR __cdecl CJabberProto::OnMenuTransportLogin(WPARAM wParam, LPARAM)
{
- MCONTACT hContact = (MCONTACT)wParam;
+ MCONTACT hContact = wParam;
if (!getByte(hContact, "IsTransport", 0))
return 0;
@@ -573,7 +573,7 @@ INT_PTR __cdecl CJabberProto::OnMenuTransportLogin(WPARAM wParam, LPARAM) INT_PTR __cdecl CJabberProto::OnMenuTransportResolve(WPARAM wParam, LPARAM)
{
- MCONTACT hContact = (MCONTACT)wParam;
+ MCONTACT hContact = wParam;
if (!getByte(hContact, "IsTransport", 0))
return 0;
@@ -585,7 +585,7 @@ INT_PTR __cdecl CJabberProto::OnMenuTransportResolve(WPARAM wParam, LPARAM) INT_PTR __cdecl CJabberProto::OnMenuBookmarkAdd(WPARAM wParam, LPARAM)
{
- MCONTACT hContact = (MCONTACT)wParam;
+ MCONTACT hContact = wParam;
if (!hContact)
return 0; // we do not add ourself to the roster. (buggy situation - should not happen)
@@ -1043,7 +1043,7 @@ int CJabberProto::OnProcessSrmmIconClick(WPARAM wParam, LPARAM lParam) if (lstrcmpA(sicd->szModule, m_szModuleName))
return 0;
- MCONTACT hContact = (MCONTACT)wParam;
+ MCONTACT hContact = wParam;
if (!hContact)
return 0;
@@ -1097,7 +1097,7 @@ INT_PTR __cdecl CJabberProto::OnMenuHandleResource(WPARAM wParam, LPARAM, LPARAM if (!m_bJabberOnline || !wParam)
return 0;
- MCONTACT hContact = (MCONTACT)wParam;
+ MCONTACT hContact = wParam;
ptrT tszJid(getTStringA(hContact, "jid"));
if (tszJid == NULL)
return 0;
@@ -1129,7 +1129,7 @@ INT_PTR __cdecl CJabberProto::OnMenuHandleDirectPresence(WPARAM wParam, LPARAM l if (!m_bJabberOnline || !wParam)
return 0;
- MCONTACT hContact = (MCONTACT)wParam;
+ MCONTACT hContact = wParam;
TCHAR *jid, text[1024];
ptrT tszJid(getTStringA(hContact, "jid"));
diff --git a/protocols/JabberG/src/jabber_notes.cpp b/protocols/JabberG/src/jabber_notes.cpp index 9a9f88f1b0..101a9cfa00 100644 --- a/protocols/JabberG/src/jabber_notes.cpp +++ b/protocols/JabberG/src/jabber_notes.cpp @@ -813,7 +813,7 @@ INT_PTR __cdecl CJabberProto::OnMenuHandleNotes(WPARAM, LPARAM) INT_PTR __cdecl CJabberProto::OnMenuSendNote(WPARAM wParam, LPARAM)
{
if (wParam) {
- CNoteItem *pItem = new CNoteItem(NULL, ptrT(getTStringA((MCONTACT)wParam, "jid")));
+ CNoteItem *pItem = new CNoteItem(NULL, ptrT(getTStringA(wParam, "jid")));
CJabberDlgBase *pDlg = new CJabberDlgNoteItem(this, pItem, &CJabberProto::ProcessOutgoingNote);
pDlg->Show();
}
diff --git a/protocols/JabberG/src/jabber_svc.cpp b/protocols/JabberG/src/jabber_svc.cpp index d1e828ea2c..442cf5d0e4 100644 --- a/protocols/JabberG/src/jabber_svc.cpp +++ b/protocols/JabberG/src/jabber_svc.cpp @@ -538,7 +538,7 @@ INT_PTR __cdecl CJabberProto::JabberSendNudge(WPARAM wParam, LPARAM) if (!m_bJabberOnline)
return 0;
- MCONTACT hContact = (MCONTACT)wParam;
+ MCONTACT hContact = wParam;
ptrT jid( getTStringA(hContact, "jid"));
if (jid == NULL)
return 0;
diff --git a/protocols/JabberG/src/jabber_userinfo.cpp b/protocols/JabberG/src/jabber_userinfo.cpp index 68eaaf10c0..b526048f78 100644 --- a/protocols/JabberG/src/jabber_userinfo.cpp +++ b/protocols/JabberG/src/jabber_userinfo.cpp @@ -445,7 +445,7 @@ static INT_PTR CALLBACK JabberUserInfoDlgProc(HWND hwndDlg, UINT msg, WPARAM wPa dat->resourcesCount = -1;
if (CallService(MS_DB_CONTACT_IS, (WPARAM)lParam, 0))
- dat->hContact = (MCONTACT)lParam;
+ dat->hContact = lParam;
else if (!IsBadReadPtr((void*)lParam, sizeof(JABBER_LIST_ITEM))) {
dat->hContact = NULL;
dat->item = (JABBER_LIST_ITEM *)lParam;
@@ -605,7 +605,7 @@ static INT_PTR CALLBACK JabberUserPhotoDlgProc(HWND hwndDlg, UINT msg, WPARAM wP // lParam is hContact
TranslateDialogDefault(hwndDlg);
photoInfo = (USER_PHOTO_INFO *) mir_alloc(sizeof(USER_PHOTO_INFO));
- photoInfo->hContact = (MCONTACT)lParam;
+ photoInfo->hContact = lParam;
photoInfo->ppro = NULL;
photoInfo->hBitmap = NULL;
SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR) photoInfo);
@@ -800,7 +800,7 @@ int CJabberProto::OnUserInfoInit(WPARAM wParam, LPARAM lParam) if (!CallService(MS_PROTO_ISPROTOCOLLOADED, 0, (LPARAM)m_szModuleName))
return 0;
- MCONTACT hContact = (MCONTACT)lParam;
+ MCONTACT hContact = lParam;
if (hContact == NULL) {
// Show our vcard
OnUserInfoInit_VCard(wParam, lParam);
diff --git a/protocols/JabberG/src/jabber_xstatus.cpp b/protocols/JabberG/src/jabber_xstatus.cpp index 4843701d63..d5ac96a819 100644 --- a/protocols/JabberG/src/jabber_xstatus.cpp +++ b/protocols/JabberG/src/jabber_xstatus.cpp @@ -1342,7 +1342,7 @@ INT_PTR __cdecl CJabberProto::OnGetXStatusEx(WPARAM wParam, LPARAM lParam) if (pepMood == NULL)
return 1;
- MCONTACT hContact = (MCONTACT)wParam;
+ MCONTACT hContact = wParam;
// fill status member
if (pData->flags & CSSF_MASK_STATUS)
diff --git a/protocols/MRA/src/Mra_menus.cpp b/protocols/MRA/src/Mra_menus.cpp index d6584728d4..acb3853288 100644 --- a/protocols/MRA/src/Mra_menus.cpp +++ b/protocols/MRA/src/Mra_menus.cpp @@ -80,7 +80,7 @@ INT_PTR CMraProto::MraRequestAuthForAll(WPARAM wParam, LPARAM lParam) INT_PTR CMraProto::MraRequestAuthorization(WPARAM wParam, LPARAM lParam)
{
- MCONTACT hContact = (MCONTACT)wParam;
+ MCONTACT hContact = wParam;
if (!hContact)
return 0;
@@ -110,7 +110,7 @@ INT_PTR CMraProto::MraGrantAuthorization(WPARAM wParam, LPARAM lParam) // send without reason, do we need any ?
CMStringA szEmail;
- if (mraGetStringA((MCONTACT)wParam, "e-mail", szEmail))
+ if (mraGetStringA(wParam, "e-mail", szEmail))
MraAuthorize(szEmail);
return 0;
@@ -121,17 +121,17 @@ INT_PTR CMraProto::MraSendPostcard(WPARAM wParam, LPARAM lParam) if (!m_bLoggedIn)
return 0;
- DWORD dwContactEMailCount = GetContactEMailCount((MCONTACT)wParam, FALSE);
+ DWORD dwContactEMailCount = GetContactEMailCount(wParam, FALSE);
if (dwContactEMailCount) {
if (dwContactEMailCount == 1) {
CMStringA szUrl, szEmail;
- if (GetContactFirstEMail((MCONTACT)wParam, FALSE, szEmail)) {
+ if (GetContactFirstEMail(wParam, FALSE, szEmail)) {
szEmail.MakeLower();
szUrl.Format("http://cards.mail.ru/event.html?rcptname=%s&rcptemail=%s", GetContactNameA((HANDLE)wParam), szEmail);
MraMPopSessionQueueAddUrl(hMPopSessionQueue, szUrl);
}
}
- else MraSelectEMailDlgShow((MCONTACT)wParam, MRA_SELECT_EMAIL_TYPE_SEND_POSTCARD);
+ else MraSelectEMailDlgShow(wParam, MRA_SELECT_EMAIL_TYPE_SEND_POSTCARD);
}
return 0;
}
@@ -141,14 +141,14 @@ INT_PTR CMraProto::MraViewAlbum(WPARAM wParam, LPARAM lParam) if (!m_bLoggedIn)
return 0;
- DWORD dwContactEMailMRCount = GetContactEMailCount((MCONTACT)wParam, TRUE);
+ DWORD dwContactEMailMRCount = GetContactEMailCount(wParam, TRUE);
if (dwContactEMailMRCount) {
if (dwContactEMailMRCount == 1) {
CMStringA szEmail;
- if (GetContactFirstEMail((MCONTACT)wParam, TRUE, szEmail))
+ if (GetContactFirstEMail(wParam, TRUE, szEmail))
MraMPopSessionQueueAddUrlAndEMail(hMPopSessionQueue, MRA_FOTO_URL, szEmail);
}
- else MraSelectEMailDlgShow((MCONTACT)wParam, MRA_SELECT_EMAIL_TYPE_VIEW_ALBUM);
+ else MraSelectEMailDlgShow(wParam, MRA_SELECT_EMAIL_TYPE_VIEW_ALBUM);
}
return 0;
}
@@ -158,14 +158,14 @@ INT_PTR CMraProto::MraReadBlog(WPARAM wParam, LPARAM lParam) if (!m_bLoggedIn)
return 0;
- DWORD dwContactEMailMRCount = GetContactEMailCount((MCONTACT)wParam, TRUE);
+ DWORD dwContactEMailMRCount = GetContactEMailCount(wParam, TRUE);
if (dwContactEMailMRCount)
if (dwContactEMailMRCount == 1) {
CMStringA szEmail;
- if (GetContactFirstEMail((MCONTACT)wParam, TRUE, szEmail))
+ if (GetContactFirstEMail(wParam, TRUE, szEmail))
MraMPopSessionQueueAddUrlAndEMail(hMPopSessionQueue, MRA_BLOGS_URL, szEmail);
}
- else MraSelectEMailDlgShow((MCONTACT)wParam, MRA_SELECT_EMAIL_TYPE_READ_BLOG);
+ else MraSelectEMailDlgShow(wParam, MRA_SELECT_EMAIL_TYPE_READ_BLOG);
return 0;
}
@@ -176,9 +176,9 @@ INT_PTR CMraProto::MraReplyBlogStatus(WPARAM wParam, LPARAM lParam) return 0;
CMStringW blogStatusMsg;
- mraGetStringW((MCONTACT)wParam, DBSETTING_BLOGSTATUS, blogStatusMsg);
+ mraGetStringW(wParam, DBSETTING_BLOGSTATUS, blogStatusMsg);
if (!blogStatusMsg.IsEmpty() || wParam == 0)
- MraSendReplyBlogStatus((MCONTACT)wParam);
+ MraSendReplyBlogStatus(wParam);
return 0;
}
@@ -188,14 +188,14 @@ INT_PTR CMraProto::MraViewVideo(WPARAM wParam, LPARAM lParam) if (!m_bLoggedIn)
return 0;
- DWORD dwContactEMailMRCount = GetContactEMailCount((MCONTACT)wParam, TRUE);
+ DWORD dwContactEMailMRCount = GetContactEMailCount(wParam, TRUE);
if (dwContactEMailMRCount) {
if (dwContactEMailMRCount == 1) {
CMStringA szEmail;
- if (GetContactFirstEMail((MCONTACT)wParam, TRUE, szEmail))
+ if (GetContactFirstEMail(wParam, TRUE, szEmail))
MraMPopSessionQueueAddUrlAndEMail(hMPopSessionQueue, MRA_VIDEO_URL, szEmail);
}
- else MraSelectEMailDlgShow((MCONTACT)wParam, MRA_SELECT_EMAIL_TYPE_VIEW_VIDEO);
+ else MraSelectEMailDlgShow(wParam, MRA_SELECT_EMAIL_TYPE_VIEW_VIDEO);
}
return 0;
}
@@ -205,14 +205,14 @@ INT_PTR CMraProto::MraAnswers(WPARAM wParam, LPARAM lParam) if (!m_bLoggedIn)
return 0;
- DWORD dwContactEMailMRCount = GetContactEMailCount((MCONTACT)wParam, TRUE);
+ DWORD dwContactEMailMRCount = GetContactEMailCount(wParam, TRUE);
if (dwContactEMailMRCount) {
if (dwContactEMailMRCount == 1) {
CMStringA szEmail;
- if (GetContactFirstEMail((MCONTACT)wParam, TRUE, szEmail))
+ if (GetContactFirstEMail(wParam, TRUE, szEmail))
MraMPopSessionQueueAddUrlAndEMail(hMPopSessionQueue, MRA_ANSWERS_URL, szEmail);
}
- else MraSelectEMailDlgShow((MCONTACT)wParam, MRA_SELECT_EMAIL_TYPE_ANSWERS);
+ else MraSelectEMailDlgShow(wParam, MRA_SELECT_EMAIL_TYPE_ANSWERS);
}
return 0;
}
@@ -222,14 +222,14 @@ INT_PTR CMraProto::MraWorld(WPARAM wParam, LPARAM lParam) if (!m_bLoggedIn)
return 0;
- DWORD dwContactEMailMRCount = GetContactEMailCount((MCONTACT)wParam, TRUE);
+ DWORD dwContactEMailMRCount = GetContactEMailCount(wParam, TRUE);
if (dwContactEMailMRCount) {
if (dwContactEMailMRCount == 1) {
CMStringA szEmail;
- if (GetContactFirstEMail((MCONTACT)wParam, TRUE, szEmail))
+ if (GetContactFirstEMail(wParam, TRUE, szEmail))
MraMPopSessionQueueAddUrlAndEMail(hMPopSessionQueue, MRA_WORLD_URL, szEmail);
}
- else MraSelectEMailDlgShow((MCONTACT)wParam, MRA_SELECT_EMAIL_TYPE_WORLD);
+ else MraSelectEMailDlgShow(wParam, MRA_SELECT_EMAIL_TYPE_WORLD);
}
return 0;
}
@@ -241,7 +241,7 @@ int CMraProto::MraRebuildContactMenu(WPARAM wParam, LPARAM lParam) BOOL bIsContactMRA, bHasEMail, bHasEMailMR, bChatAgent;
DWORD dwContactSeverFlags = 0;
CMStringW blogStatusMsgSize;
- MCONTACT hContact = (MCONTACT)wParam;
+ MCONTACT hContact = wParam;
// proto own contact
bIsContactMRA = IsContactMra(hContact);
diff --git a/protocols/MRA/src/Mra_svcs.cpp b/protocols/MRA/src/Mra_svcs.cpp index bbc74e26cb..b61e137105 100644 --- a/protocols/MRA/src/Mra_svcs.cpp +++ b/protocols/MRA/src/Mra_svcs.cpp @@ -168,7 +168,7 @@ INT_PTR CMraProto::MraXStatusMenu(WPARAM wParam, LPARAM lParam, LPARAM param) int CMraProto::MraContactDeleted(WPARAM wParam, LPARAM lParam)
{
- MCONTACT hContact = (MCONTACT)wParam;
+ MCONTACT hContact = wParam;
if (!m_bLoggedIn || !hContact)
return 0;
@@ -191,7 +191,7 @@ int CMraProto::MraDbSettingChanged(WPARAM wParam, LPARAM lParam) if (!m_bLoggedIn || !lParam)
return 0;
- MCONTACT hContact = (MCONTACT)wParam;
+ MCONTACT hContact = wParam;
if (hContact == NULL)
return 0;
@@ -298,7 +298,7 @@ int CMraProto::MraDbSettingChanged(WPARAM wParam, LPARAM lParam) int CMraProto::MraExtraIconsApply(WPARAM wParam, LPARAM lParam)
{
- SetExtraIcons((MCONTACT)wParam);
+ SetExtraIcons(wParam);
return 0;
}
@@ -449,7 +449,7 @@ INT_PTR CMraProto::MraSetXStatusEx(WPARAM wParam, LPARAM lParam) INT_PTR CMraProto::MraGetXStatusEx(WPARAM wParam, LPARAM lParam)
{
- MCONTACT hContact = (MCONTACT)wParam;
+ MCONTACT hContact = wParam;
CUSTOM_STATUS *pData = (CUSTOM_STATUS*)lParam;
if (pData->cbSize < sizeof(CUSTOM_STATUS))
@@ -552,7 +552,7 @@ INT_PTR CMraProto::MraSendNudge(WPARAM wParam, LPARAM lParam) {
if (m_bLoggedIn && wParam) {
LPWSTR lpwszAlarmMessage = TranslateW(MRA_ALARM_MESSAGE);
- MCONTACT hContact = (MCONTACT)wParam;
+ MCONTACT hContact = wParam;
CMStringA szEmail;
if (mraGetStringA(hContact, "e-mail", szEmail))
@@ -619,7 +619,7 @@ INT_PTR CMraProto::MraGetMyAvatar(WPARAM wParam, LPARAM lParam) int CMraProto::OnGroupChanged(WPARAM wParam, LPARAM lParam)
{
- MCONTACT hContact = (MCONTACT)wParam;
+ MCONTACT hContact = wParam;
if (hContact == NULL) {
CLISTGROUPCHANGE *cgc = (CLISTGROUPCHANGE*)lParam;
if (cgc->pszOldName == NULL)
diff --git a/protocols/MSN/src/msn_menu.cpp b/protocols/MSN/src/msn_menu.cpp index f36fccd9e2..723af931a5 100644 --- a/protocols/MSN/src/msn_menu.cpp +++ b/protocols/MSN/src/msn_menu.cpp @@ -33,7 +33,7 @@ HANDLE hNetMeeting, hBlockCom, hSendHotMail, hInviteChat, hViewProfile; INT_PTR CMsnProto::MsnBlockCommand(WPARAM wParam, LPARAM)
{
if (msnLoggedIn) {
- MCONTACT hContact = (MCONTACT)wParam;
+ MCONTACT hContact = wParam;
char tEmail[MSN_MAX_EMAIL_LEN];
db_get_static(hContact, m_szModuleName, "e-mail", tEmail, sizeof(tEmail));
@@ -60,7 +60,7 @@ INT_PTR CMsnProto::MsnGotoInbox(WPARAM, LPARAM) INT_PTR CMsnProto::MsnSendHotmail(WPARAM wParam, LPARAM)
{
- MCONTACT hContact = (MCONTACT)wParam;
+ MCONTACT hContact = wParam;
char szEmail[MSN_MAX_EMAIL_LEN];
if (MSN_IsMeByContact(hContact, szEmail))
@@ -85,7 +85,7 @@ INT_PTR CMsnProto::MsnSetupAlerts(WPARAM, LPARAM) INT_PTR CMsnProto::MsnViewProfile(WPARAM wParam, LPARAM)
{
- MCONTACT hContact = (MCONTACT)wParam;
+ MCONTACT hContact = wParam;
char buf[64], *cid;
if (hContact == NULL)
@@ -127,7 +127,7 @@ INT_PTR CMsnProto::MsnInviteCommand(WPARAM, LPARAM) int CMsnProto::OnPrebuildContactMenu(WPARAM wParam, LPARAM)
{
- MCONTACT hContact = (MCONTACT)wParam;
+ MCONTACT hContact = wParam;
char szEmail[MSN_MAX_EMAIL_LEN];
if ( !MSN_IsMyContact(hContact))
@@ -157,7 +157,7 @@ int CMsnProto::OnPrebuildContactMenu(WPARAM wParam, LPARAM) int CMsnProto::OnContactDoubleClicked(WPARAM wParam, LPARAM)
{
- MCONTACT hContact = (MCONTACT)wParam;
+ MCONTACT hContact = wParam;
if (emailEnabled && MSN_IsMeByContact(hContact)) {
MsnSendHotmail(wParam, 0);
@@ -374,31 +374,31 @@ static CMsnProto* GetProtoInstanceByHContact(MCONTACT hContact) static INT_PTR MsnMenuBlockCommand(WPARAM wParam, LPARAM lParam)
{
- CMsnProto* ppro = GetProtoInstanceByHContact((MCONTACT)wParam);
+ CMsnProto* ppro = GetProtoInstanceByHContact(wParam);
return (ppro) ? ppro->MsnBlockCommand(wParam, lParam) : 0;
}
static INT_PTR MsnMenuViewProfile(WPARAM wParam, LPARAM lParam)
{
- CMsnProto* ppro = GetProtoInstanceByHContact((MCONTACT)wParam);
+ CMsnProto* ppro = GetProtoInstanceByHContact(wParam);
return (ppro) ? ppro->MsnViewProfile(wParam, lParam) : 0;
}
static INT_PTR MsnMenuSendNetMeeting(WPARAM wParam, LPARAM lParam)
{
- CMsnProto* ppro = GetProtoInstanceByHContact((MCONTACT)wParam);
+ CMsnProto* ppro = GetProtoInstanceByHContact(wParam);
return (ppro) ? ppro->MsnSendNetMeeting(wParam, lParam) : 0;
}
static INT_PTR MsnMenuSendHotmail(WPARAM wParam, LPARAM lParam)
{
- CMsnProto* ppro = GetProtoInstanceByHContact((MCONTACT)wParam);
+ CMsnProto* ppro = GetProtoInstanceByHContact(wParam);
return (ppro) ? ppro->MsnSendHotmail(wParam, lParam) : 0;
}
static int MSN_OnPrebuildContactMenu(WPARAM wParam, LPARAM lParam)
{
- CMsnProto* ppro = GetProtoInstanceByHContact((MCONTACT)wParam);
+ CMsnProto* ppro = GetProtoInstanceByHContact(wParam);
if (ppro)
ppro->OnPrebuildContactMenu(wParam, lParam);
else {
diff --git a/protocols/MSN/src/msn_svcs.cpp b/protocols/MSN/src/msn_svcs.cpp index f19cbc0dec..ec1c2f97b8 100644 --- a/protocols/MSN/src/msn_svcs.cpp +++ b/protocols/MSN/src/msn_svcs.cpp @@ -246,7 +246,7 @@ INT_PTR CMsnProto::SendNudge(WPARAM wParam, LPARAM lParam) {
if (!msnLoggedIn) return 0;
- MCONTACT hContact = (MCONTACT)wParam;
+ MCONTACT hContact = wParam;
char tEmail[MSN_MAX_EMAIL_LEN];
if (MSN_IsMeByContact(hContact, tEmail)) return 0;
@@ -380,7 +380,7 @@ INT_PTR CMsnProto::SetCurrentMedia(WPARAM wParam, LPARAM lParam) int CMsnProto::OnContactDeleted(WPARAM wParam, LPARAM lParam)
{
- const MCONTACT hContact = (MCONTACT)wParam;
+ const MCONTACT hContact = wParam;
if (!msnLoggedIn) //should never happen for MSN contacts
return 0;
@@ -424,7 +424,7 @@ int CMsnProto::OnGroupChange(WPARAM wParam,LPARAM lParam) {
if (!msnLoggedIn || !MyOptions.ManageServer) return 0;
- const MCONTACT hContact = (MCONTACT)wParam;
+ const MCONTACT hContact = wParam;
const CLISTGROUPCHANGE* grpchg = (CLISTGROUPCHANGE*)lParam;
if (hContact == NULL)
@@ -458,7 +458,7 @@ int CMsnProto::OnGroupChange(WPARAM wParam,LPARAM lParam) int CMsnProto::OnDbSettingChanged(WPARAM wParam,LPARAM lParam)
{
- MCONTACT hContact = (MCONTACT)wParam;
+ MCONTACT hContact = wParam;
DBCONTACTWRITESETTING* cws = (DBCONTACTWRITESETTING*)lParam;
if (!msnLoggedIn)
@@ -619,7 +619,7 @@ INT_PTR CMsnProto::GetUnreadEmailCount(WPARAM wParam, LPARAM lParam) INT_PTR CMsnProto::OnLeaveChat(WPARAM wParam,LPARAM lParam)
{
- MCONTACT hContact = (MCONTACT)wParam;
+ MCONTACT hContact = wParam;
if (isChatRoom(hContact) != 0) {
DBVARIANT dbv;
if (getTString(hContact, "ChatRoomID", &dbv) == 0) {
diff --git a/protocols/Tlen/src/tlen.cpp b/protocols/Tlen/src/tlen.cpp index bc9cde59f4..5143dcb913 100644 --- a/protocols/Tlen/src/tlen.cpp +++ b/protocols/Tlen/src/tlen.cpp @@ -114,7 +114,7 @@ static void TlenRegisterIcons() int TlenProtocol::PrebuildContactMenu(WPARAM wParam, LPARAM lParam)
{
- MCONTACT hContact = (MCONTACT)wParam;
+ MCONTACT hContact = wParam;
if (hContact != NULL && isOnline) {
DBVARIANT dbv;
if (!db_get(hContact, m_szModuleName, "jid", &dbv)) {
@@ -140,7 +140,7 @@ int TlenProtocol::PrebuildContactMenu(WPARAM wParam, LPARAM lParam) INT_PTR TlenProtocol::ContactMenuHandleRequestAuth(WPARAM wParam, LPARAM lParam)
{
- MCONTACT hContact = (MCONTACT)wParam;
+ MCONTACT hContact = wParam;
if (hContact != NULL && isOnline) {
DBVARIANT dbv;
if (!db_get(hContact, m_szModuleName, "jid", &dbv)) {
@@ -153,7 +153,7 @@ INT_PTR TlenProtocol::ContactMenuHandleRequestAuth(WPARAM wParam, LPARAM lParam) INT_PTR TlenProtocol::ContactMenuHandleGrantAuth(WPARAM wParam, LPARAM lParam)
{
- MCONTACT hContact = (MCONTACT)wParam;
+ MCONTACT hContact = wParam;
if (hContact != NULL && isOnline) {
DBVARIANT dbv;
if (!db_get(hContact, m_szModuleName, "jid", &dbv)) {
@@ -166,7 +166,7 @@ INT_PTR TlenProtocol::ContactMenuHandleGrantAuth(WPARAM wParam, LPARAM lParam) INT_PTR TlenProtocol::ContactMenuHandleSendPicture(WPARAM wParam, LPARAM lParam)
{
- MCONTACT hContact = (MCONTACT)wParam;
+ MCONTACT hContact = wParam;
if (hContact != NULL && isOnline)
SendPicture(this, hContact);
diff --git a/protocols/Tlen/src/tlen_muc.cpp b/protocols/Tlen/src/tlen_muc.cpp index 31dc19bb4b..fc87a29b09 100644 --- a/protocols/Tlen/src/tlen_muc.cpp +++ b/protocols/Tlen/src/tlen_muc.cpp @@ -1031,7 +1031,7 @@ INT_PTR TlenProtocol::MUCContactMenuHandleMUC(WPARAM wParam, LPARAM lParam) if (!isOnline)
return 1;
- if ((hContact=(MCONTACT)wParam) != NULL && isOnline) {
+ if ((hContact=wParam) != NULL && isOnline) {
if (!db_get(hContact, m_szModuleName, "jid", &dbv)) {
char serialId[32];
mir_snprintf(serialId, SIZEOF(serialId), TLEN_IQID"%d", TlenSerialNext(this));
diff --git a/protocols/Tlen/src/tlen_svc.cpp b/protocols/Tlen/src/tlen_svc.cpp index 4f996b8a38..770f668ea4 100644 --- a/protocols/Tlen/src/tlen_svc.cpp +++ b/protocols/Tlen/src/tlen_svc.cpp @@ -599,7 +599,7 @@ static void __cdecl TlenGetAwayMsgThread(void *ptr) INT_PTR TlenProtocol::SendAlert(WPARAM wParam, LPARAM lParam)
{
- MCONTACT hContact = (MCONTACT)wParam;
+ MCONTACT hContact = wParam;
DBVARIANT dbv;
if (isOnline && !db_get(hContact, m_szModuleName, "jid", &dbv)) {
TlenSend(this, "<m tp='a' to='%s'/>", dbv.pszVal);
@@ -1035,12 +1035,12 @@ int TlenProtocol::TlenContactDeleted(WPARAM wParam, LPARAM lParam) if (!isOnline) // should never happen
return 0;
- char *szProto = GetContactProto((MCONTACT)wParam);
+ char *szProto = GetContactProto(wParam);
if (szProto == NULL || strcmp(szProto, m_szModuleName))
return 0;
DBVARIANT dbv;
- if (!db_get((MCONTACT)wParam, m_szModuleName, "jid", &dbv)) {
+ if (!db_get(wParam, m_szModuleName, "jid", &dbv)) {
char *jid, *p, *q;
jid = dbv.pszVal;
diff --git a/protocols/Tlen/src/tlen_voice.cpp b/protocols/Tlen/src/tlen_voice.cpp index dca3634307..148fb26919 100644 --- a/protocols/Tlen/src/tlen_voice.cpp +++ b/protocols/Tlen/src/tlen_voice.cpp @@ -700,7 +700,7 @@ INT_PTR TlenProtocol::VoiceContactMenuHandleVoice(WPARAM wParam, LPARAM lParam) if (!isOnline)
return 1;
- if ((hContact=(MCONTACT)wParam) != NULL) {
+ if ((hContact=wParam) != NULL) {
if (!db_get(hContact, m_szModuleName, "jid", &dbv)) {
char serialId[32];
mir_snprintf(serialId, SIZEOF(serialId), "%d", TlenSerialNext(this));
diff --git a/protocols/Twitter/src/contacts.cpp b/protocols/Twitter/src/contacts.cpp index c78c28f914..fb6a41135a 100644 --- a/protocols/Twitter/src/contacts.cpp +++ b/protocols/Twitter/src/contacts.cpp @@ -188,7 +188,7 @@ int TwitterProto::OnContactDeleted(WPARAM wParam,LPARAM lParam) if(m_iStatus != ID_STATUS_ONLINE)
return 0;
- const MCONTACT hContact = (MCONTACT)wParam;
+ const MCONTACT hContact = wParam;
if(!IsMyContact(hContact))
return 0;
diff --git a/protocols/Twitter/src/proto.cpp b/protocols/Twitter/src/proto.cpp index e9ee5618c9..b301bc1fb3 100644 --- a/protocols/Twitter/src/proto.cpp +++ b/protocols/Twitter/src/proto.cpp @@ -246,7 +246,7 @@ INT_PTR TwitterProto::GetStatus(WPARAM,LPARAM) INT_PTR TwitterProto::ReplyToTweet(WPARAM wParam,LPARAM)
{
// TODO: support replying to tweets instead of just users
- MCONTACT hContact = (MCONTACT)wParam;
+ MCONTACT hContact = wParam;
HWND hDlg = CreateDialogParam(g_hInstance,MAKEINTRESOURCE(IDD_TWEET),0,tweet_proc,reinterpret_cast<LPARAM>(this));
@@ -264,7 +264,7 @@ INT_PTR TwitterProto::ReplyToTweet(WPARAM wParam,LPARAM) INT_PTR TwitterProto::VisitHomepage(WPARAM wParam,LPARAM)
{
- MCONTACT hContact = (MCONTACT)wParam;
+ MCONTACT hContact = wParam;
DBVARIANT dbv;
// TODO: remove this
@@ -398,7 +398,7 @@ int TwitterProto::OnPreShutdown(WPARAM,LPARAM) int TwitterProto::OnPrebuildContactMenu(WPARAM wParam,LPARAM)
{
- MCONTACT hContact = (MCONTACT)wParam;
+ MCONTACT hContact = wParam;
if(IsMyContact(hContact))
ShowContactMenus(true);
diff --git a/protocols/Xfire/src/main.cpp b/protocols/Xfire/src/main.cpp index e331f44302..4f2e56000c 100644 --- a/protocols/Xfire/src/main.cpp +++ b/protocols/Xfire/src/main.cpp @@ -1337,7 +1337,7 @@ static void SendBadAck( LPVOID param ) static INT_PTR UserIsTyping(WPARAM wParam, LPARAM lParam)
{
- MCONTACT hContact = (MCONTACT)wParam;
+ MCONTACT hContact = wParam;
DBVARIANT dbv;
if (lParam==PROTOTYPE_SELFTYPING_ON)
@@ -1929,14 +1929,14 @@ static INT_PTR GetIPPort(WPARAM wParam,LPARAM lParam) HGLOBAL clipbuffer;
char* buffer;
- if (db_get_w((MCONTACT)wParam, protocolname, "Port", -1)==0)
+ if (db_get_w(wParam, protocolname, "Port", -1)==0)
return 0;
DBVARIANT dbv;
- if (db_get_s((MCONTACT)wParam, protocolname, "ServerIP",&dbv))
+ if (db_get_s(wParam, protocolname, "ServerIP",&dbv))
return 0;
- mir_snprintf(temp, SIZEOF(temp), "%s:%d", dbv.pszVal, db_get_w((MCONTACT)wParam, protocolname, "Port", -1));
+ mir_snprintf(temp, SIZEOF(temp), "%s:%d", dbv.pszVal, db_get_w(wParam, protocolname, "Port", -1));
db_free(&dbv);
@@ -1962,14 +1962,14 @@ static INT_PTR GetVIPPort(WPARAM wParam,LPARAM lParam) HGLOBAL clipbuffer;
char* buffer;
- if (db_get_w((MCONTACT)wParam, protocolname, "VPort", -1)==0)
+ if (db_get_w(wParam, protocolname, "VPort", -1)==0)
return 0;
DBVARIANT dbv;
- if (db_get_s((MCONTACT)wParam, protocolname, "VServerIP",&dbv))
+ if (db_get_s(wParam, protocolname, "VServerIP",&dbv))
return 0;
- mir_snprintf(temp, SIZEOF(temp), "%s:%d", dbv.pszVal, db_get_w((MCONTACT)wParam, protocolname, "VPort", -1));
+ mir_snprintf(temp, SIZEOF(temp), "%s:%d", dbv.pszVal, db_get_w(wParam, protocolname, "VPort", -1));
db_free(&dbv);
@@ -1994,7 +1994,7 @@ static INT_PTR GotoProfile(WPARAM wParam,LPARAM lParam) DBVARIANT dbv;
char temp[64]="";
- if (db_get_s((MCONTACT)wParam, protocolname, "Username",&dbv))
+ if (db_get_s(wParam, protocolname, "Username",&dbv))
return 0;
strcpy(temp,"http://xfire.com/profile/");
@@ -2010,7 +2010,7 @@ static INT_PTR GotoXFireClanSite(WPARAM wParam,LPARAM lParam) { DBVARIANT dbv;
char temp[64]="";
- int clanid=db_get_dw((MCONTACT)wParam, protocolname, "Clan",-1);
+ int clanid=db_get_dw(wParam, protocolname, "Clan",-1);
mir_snprintf(temp, SIZEOF(temp), "ClanUrl_%d", clanid);
if (db_get_s(NULL, protocolname, temp,&dbv))
@@ -2071,7 +2071,7 @@ static INT_PTR GotoProfileAct(WPARAM wParam,LPARAM lParam) int RebuildContactMenu( WPARAM wParam, LPARAM lParam )
{
- MCONTACT hContact = (MCONTACT)wParam;
+ MCONTACT hContact = wParam;
bool bEnabled = true, bEnabled2 = true;
DBVARIANT dbv;
@@ -3254,14 +3254,14 @@ INT_PTR SendPrefs(WPARAM wparam, LPARAM lparam) int ContactDeleted(WPARAM wParam,LPARAM lParam)
{
- if (!db_get_b((MCONTACT)wParam, protocolname, "DontSendDenyPacket", 0))
- if (db_get_b((MCONTACT)wParam,"CList","NotOnList",0))
+ if (!db_get_b(wParam, protocolname, "DontSendDenyPacket", 0))
+ if (db_get_b(wParam,"CList","NotOnList",0))
{
if (myClient!=NULL)
if (myClient->client->connected)
{
DBVARIANT dbv2;
- if (!db_get((MCONTACT)wParam,protocolname,"Username",&dbv2)) {
+ if (!db_get(wParam,protocolname,"Username",&dbv2)) {
SendDenyInvitationPacket deny;
deny.name = dbv2.pszVal;
myClient->client->send( &deny );
@@ -3294,7 +3294,7 @@ INT_PTR RemoveFriend(WPARAM wParam,LPARAM lParam) char temp[256];
DBVARIANT dbv;
- if (!db_get_s((MCONTACT)wParam, protocolname, "Username",&dbv))
+ if (!db_get_s(wParam, protocolname, "Username",&dbv))
{
mir_snprintf(temp, SIZEOF(temp), Translate("Do you really want to delete your friend %s?"), dbv.pszVal);
if (MessageBoxA(NULL,temp,Translate("Confirm Delete"),MB_YESNO|MB_ICONQUESTION)==IDYES)
@@ -3305,7 +3305,7 @@ INT_PTR RemoveFriend(WPARAM wParam,LPARAM lParam) {
SendRemoveBuddyPacket removeBuddy;
- removeBuddy.userid=db_get_dw((MCONTACT)wParam,protocolname,"UserId",0);
+ removeBuddy.userid=db_get_dw(wParam,protocolname,"UserId",0);
if (removeBuddy.userid!=0)
{
@@ -3323,7 +3323,7 @@ INT_PTR BlockFriend(WPARAM wParam,LPARAM lParam) {
DBVARIANT dbv;
- if (!db_get_s((MCONTACT)wParam, protocolname, "Username",&dbv))
+ if (!db_get_s(wParam, protocolname, "Username",&dbv))
{
if (MessageBox(NULL,TranslateT("Block this user from ever contacting you again?"),TranslateT("Block Confirmation"),MB_YESNO|MB_ICONQUESTION)==IDYES)
{
@@ -3350,7 +3350,7 @@ INT_PTR StartThisGame(WPARAM wParam,LPARAM lParam) { xgamelist.Block(TRUE);
//hole die gameid des spiels
- int id=db_get_w((MCONTACT)wParam, protocolname, "GameId",0);
+ int id=db_get_w(wParam, protocolname, "GameId",0);
//hole passendes spielobjekt
Xfire_game*game=xgamelist.getGamebyGameid(id);
@@ -3370,7 +3370,7 @@ INT_PTR JoinGame(WPARAM wParam,LPARAM lParam) { xgamelist.Block(TRUE);
//hole die gameid des spiels
- int id=db_get_w((MCONTACT)wParam, protocolname, "GameId",0);
+ int id=db_get_w(wParam, protocolname, "GameId",0);
//hole passendes spielobjekt
Xfire_game*game=xgamelist.getGamebyGameid(id);
@@ -3379,8 +3379,8 @@ INT_PTR JoinGame(WPARAM wParam,LPARAM lParam) { if (game)
{
DBVARIANT dbv; //dbv.pszVal
- int port=db_get_w((MCONTACT)wParam, protocolname, "Port",0);
- if (!db_get_s((MCONTACT)wParam, protocolname, "ServerIP",&dbv))
+ int port=db_get_w(wParam, protocolname, "Port",0);
+ if (!db_get_s(wParam, protocolname, "ServerIP",&dbv))
{
//starte spiel mit netzwerk parametern
game->start_game(dbv.pszVal,port);
diff --git a/protocols/Xfire/src/userdetails.cpp b/protocols/Xfire/src/userdetails.cpp index 1db5474f2f..45d72bdb58 100644 --- a/protocols/Xfire/src/userdetails.cpp +++ b/protocols/Xfire/src/userdetails.cpp @@ -91,14 +91,14 @@ static int GetIPPortUDetails(MCONTACT wParam,char* feld1,char* feld2) HGLOBAL clipbuffer;
char* buffer;
- if (db_get_w((MCONTACT)wParam, protocolname, feld2, -1)==0)
+ if (db_get_w(wParam, protocolname, feld2, -1)==0)
return 0;
DBVARIANT dbv;
- if (db_get_s((MCONTACT)wParam, protocolname, feld1,&dbv))
+ if (db_get_s(wParam, protocolname, feld1,&dbv))
return 0;
- mir_snprintf(temp, SIZEOF(temp), "%s:%d", dbv.pszVal, db_get_w((MCONTACT)wParam, protocolname, feld2, -1));
+ mir_snprintf(temp, SIZEOF(temp), "%s:%d", dbv.pszVal, db_get_w(wParam, protocolname, feld2, -1));
db_free(&dbv);
@@ -429,7 +429,7 @@ static INT_PTR CALLBACK DlgProcUserDetails(HWND hwndDlg, UINT msg, WPARAM wParam int OnDetailsInit(WPARAM wParam,LPARAM lParam)
{
- if (!IsXFireContact((MCONTACT)lParam))
+ if (!IsXFireContact(lParam))
return 0;
OPTIONSDIALOGPAGE odp = { sizeof(odp) };
diff --git a/protocols/Yahoo/src/im.cpp b/protocols/Yahoo/src/im.cpp index b85ce78357..2606576a4e 100644 --- a/protocols/Yahoo/src/im.cpp +++ b/protocols/Yahoo/src/im.cpp @@ -227,7 +227,7 @@ int __cdecl CYahooProto::RecvMsg(MCONTACT hContact, PROTORECVEVENT* pre) INT_PTR __cdecl CYahooProto::SendNudge(WPARAM wParam, LPARAM lParam)
{
- MCONTACT hContact = (MCONTACT)wParam;
+ MCONTACT hContact = wParam;
debugLogA("[YAHOO_SENDNUDGE]");
diff --git a/protocols/Yahoo/src/services.cpp b/protocols/Yahoo/src/services.cpp index dc28575a65..ad342a2b1e 100644 --- a/protocols/Yahoo/src/services.cpp +++ b/protocols/Yahoo/src/services.cpp @@ -83,7 +83,7 @@ void CYahooProto::BroadcastStatus(int s) int __cdecl CYahooProto::OnContactDeleted(WPARAM wParam, LPARAM lParam)
{
DBVARIANT dbv;
- MCONTACT hContact = (MCONTACT)wParam;
+ MCONTACT hContact = wParam;
debugLogA("[YahooContactDeleted]");
@@ -254,11 +254,11 @@ INT_PTR __cdecl CYahooProto::OnShowProfileCommand(WPARAM wParam, LPARAM lParam) /**
* We don't show profile for users using other IM clients through the IM server bridge
*/
- if (getWord((MCONTACT)wParam, "yprotoid", 0) != 0) {
+ if (getWord(wParam, "yprotoid", 0) != 0) {
return 0;
}
- if (getString((MCONTACT)wParam, YAHOO_LOGINID, &dbv))
+ if (getString(wParam, YAHOO_LOGINID, &dbv))
return 0;
mir_snprintf(tUrl, sizeof(tUrl), "http://profiles.yahoo.com/%s", dbv.pszVal);
@@ -497,7 +497,7 @@ void CYahooProto::MenuUninit( void ) int __cdecl CYahooProto::OnPrebuildContactMenu(WPARAM wParam, LPARAM)
{
- const MCONTACT hContact = (MCONTACT)wParam;
+ const MCONTACT hContact = wParam;
if (!IsMyContact(hContact)) {
debugLogA("[OnPrebuildContactMenu] Not a Yahoo Contact!!!");
return 0;
diff --git a/protocols/Yahoo/src/user_info.cpp b/protocols/Yahoo/src/user_info.cpp index 0f020adbd7..85f26616c7 100644 --- a/protocols/Yahoo/src/user_info.cpp +++ b/protocols/Yahoo/src/user_info.cpp @@ -118,7 +118,7 @@ int __cdecl CYahooProto::OnUserInfoInit( WPARAM wParam, LPARAM lParam ) odp.dwInitParam = (LPARAM)this;
odp.flags = ODPF_TCHAR | ODPF_DONTTRANSLATE;
- MCONTACT hContact = (MCONTACT)lParam;
+ MCONTACT hContact = lParam;
if ( IsMyContact(hContact)) {
odp.pfnDlgProc = YahooUserInfoDlgProc;
odp.position = -1900000000;
diff --git a/protocols/Yahoo/src/util.cpp b/protocols/Yahoo/src/util.cpp index 9550adf4d4..8e9aca7833 100644 --- a/protocols/Yahoo/src/util.cpp +++ b/protocols/Yahoo/src/util.cpp @@ -162,8 +162,8 @@ int __cdecl CYahooProto::OnSettingChanged(WPARAM wParam, LPARAM lParam) debugLogA("DB Setting changed. YAHOO user's visible setting changed.");
DBVARIANT dbv;
- if (!getString((MCONTACT)wParam, YAHOO_LOGINID, &dbv)) {
- int iAdd = (ID_STATUS_OFFLINE == getWord((MCONTACT)wParam, "ApparentMode", 0));
+ if (!getString(wParam, YAHOO_LOGINID, &dbv)) {
+ int iAdd = (ID_STATUS_OFFLINE == getWord(wParam, "ApparentMode", 0));
stealth(dbv.pszVal, iAdd);
db_free(&dbv);
}
|