summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-02-11 19:01:03 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-02-11 19:01:03 +0000
commit1925d3521846f4e6683d3d537cc41de9c9bd7250 (patch)
tree3f9bd6e5f557dc9eac040b078ededd5ee8e7870d /protocols
parentb63d67c92da0c420ee7c4f81b8ecdd3b8cfd132d (diff)
"we don't need these variables" (c) Pink Floyd
git-svn-id: http://svn.miranda-ng.org/main/trunk@8101 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols')
-rw-r--r--protocols/AimOscar/src/links.cpp2
-rw-r--r--protocols/AimOscar/src/services.cpp88
-rw-r--r--protocols/AimOscar/src/theme.cpp3
-rw-r--r--protocols/AimOscar/src/ui.cpp2
-rw-r--r--protocols/FacebookRM/src/chat.cpp4
-rw-r--r--protocols/GTalkExt/src/avatar.cpp6
-rw-r--r--protocols/GTalkExt/src/handlers.cpp5
-rw-r--r--protocols/Gadu-Gadu/src/core.cpp6
-rw-r--r--protocols/Gadu-Gadu/src/gg.cpp6
-rw-r--r--protocols/Gadu-Gadu/src/image.cpp3
-rw-r--r--protocols/Gadu-Gadu/src/services.cpp3
-rw-r--r--protocols/IRCG/src/services.cpp6
-rw-r--r--protocols/IcqOscarJ/src/icq_menu.cpp6
-rw-r--r--protocols/IcqOscarJ/src/icq_servlist.cpp16
-rw-r--r--protocols/IcqOscarJ/src/icq_xstatus.cpp20
-rw-r--r--protocols/IcqOscarJ/src/icqosc_svcs.cpp3
-rw-r--r--protocols/JabberG/src/jabber_adhoc.cpp5
-rw-r--r--protocols/JabberG/src/jabber_events.cpp6
-rw-r--r--protocols/JabberG/src/jabber_groupchat.cpp6
-rw-r--r--protocols/JabberG/src/jabber_icolib.cpp3
-rw-r--r--protocols/JabberG/src/jabber_menu.cpp41
-rw-r--r--protocols/JabberG/src/jabber_svc.cpp3
-rw-r--r--protocols/JabberG/src/jabber_xstatus.cpp4
-rw-r--r--protocols/MRA/src/Mra_menus.cpp6
-rw-r--r--protocols/MRA/src/Mra_svcs.cpp22
-rw-r--r--protocols/MSN/src/msn_menu.cpp26
-rw-r--r--protocols/MSN/src/msn_svcs.cpp17
-rw-r--r--protocols/Tlen/src/tlen.cpp13
-rw-r--r--protocols/Tlen/src/tlen_svc.cpp3
-rw-r--r--protocols/Twitter/src/contacts.cpp4
-rw-r--r--protocols/Twitter/src/proto.cpp11
-rw-r--r--protocols/Xfire/src/main.cpp6
-rw-r--r--protocols/Yahoo/src/im.cpp4
-rw-r--r--protocols/Yahoo/src/services.cpp9
34 files changed, 128 insertions, 240 deletions
diff --git a/protocols/AimOscar/src/links.cpp b/protocols/AimOscar/src/links.cpp
index 0286e3af93..538f9e3d6d 100644
--- a/protocols/AimOscar/src/links.cpp
+++ b/protocols/AimOscar/src/links.cpp
@@ -58,7 +58,7 @@ static TCHAR* url_decode(TCHAR* str)
return str;
}
-static INT_PTR ServiceParseAimLink(WPARAM /*wParam*/,LPARAM lParam)
+static INT_PTR ServiceParseAimLink(WPARAM,LPARAM lParam)
{
if (lParam == 0) return 1; /* sanity check */
diff --git a/protocols/AimOscar/src/services.cpp b/protocols/AimOscar/src/services.cpp
index 24d9b1e33f..e21396f34c 100644
--- a/protocols/AimOscar/src/services.cpp
+++ b/protocols/AimOscar/src/services.cpp
@@ -26,7 +26,7 @@ INT_PTR CAimProto::GetMyAwayMsg(WPARAM wParam,LPARAM lParam)
return (lParam & SGMA_UNICODE) ? (INT_PTR)mir_utf8decodeW(*msgptr) : (INT_PTR)mir_utf8decodeA(*msgptr);
}
-int CAimProto::OnIdleChanged(WPARAM /*wParam*/, LPARAM lParam)
+int CAimProto::OnIdleChanged(WPARAM, LPARAM lParam)
{
if (state != 1)
{
@@ -99,7 +99,7 @@ INT_PTR CAimProto::GetProfile(WPARAM wParam, LPARAM lParam)
return 0;
}
-INT_PTR CAimProto::GetHTMLAwayMsg(WPARAM wParam, LPARAM /*lParam*/)
+INT_PTR CAimProto::GetHTMLAwayMsg(WPARAM wParam, LPARAM)
{
if (state != 1)
return 0;
@@ -113,13 +113,12 @@ INT_PTR CAimProto::GetHTMLAwayMsg(WPARAM wParam, LPARAM /*lParam*/)
return 0;
}
-int CAimProto::OnDbSettingChanged(WPARAM wParam,LPARAM lParam)
+int CAimProto::OnDbSettingChanged(WPARAM hContact, LPARAM lParam)
{
DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING*)lParam;
- if (strcmp(cws->szModule, MOD_KEY_CL) == 0 && state == 1 && wParam)
+ if (strcmp(cws->szModule, MOD_KEY_CL) == 0 && state == 1 && hContact)
{
- MCONTACT hContact = wParam;
if (strcmp(cws->szSetting, AIM_KEY_NL) == 0)
{
if (cws->value.type == DBVT_DELETED)
@@ -165,12 +164,10 @@ int CAimProto::OnDbSettingChanged(WPARAM wParam,LPARAM lParam)
return 0;
}
-int CAimProto::OnContactDeleted(WPARAM wParam,LPARAM /*lParam*/)
+int CAimProto::OnContactDeleted(WPARAM hContact, LPARAM)
{
if (state != 1) return 0;
- MCONTACT hContact = wParam;
-
if (db_get_b(hContact, MOD_KEY_CL, AIM_KEY_NL, 0))
return 0;
@@ -199,33 +196,27 @@ int CAimProto::OnContactDeleted(WPARAM wParam,LPARAM /*lParam*/)
}
-int CAimProto::OnGroupChange(WPARAM wParam,LPARAM lParam)
+int CAimProto::OnGroupChange(WPARAM hContact,LPARAM lParam)
{
if (state != 1 || !getByte(AIM_KEY_MG, 1)) return 0;
- MCONTACT hContact = wParam;
CLISTGROUPCHANGE* grpchg = (CLISTGROUPCHANGE*)lParam;
- if (hContact == NULL)
- {
- if (grpchg->pszNewName == NULL && grpchg->pszOldName != NULL)
- {
+ if (hContact == NULL) {
+ if (grpchg->pszNewName == NULL && grpchg->pszOldName != NULL) {
char* szOldName = mir_utf8encodeT(grpchg->pszOldName);
unsigned short group_id = group_list.find_id(szOldName);
- if (group_id)
- {
+ if (group_id) {
aim_delete_contact(hServerConn, seqno, szOldName, 0, group_id, 1, false);
group_list.remove_by_id(group_id);
update_server_group("", 0);
}
mir_free(szOldName);
}
- else if (grpchg->pszNewName != NULL && grpchg->pszOldName != NULL)
- {
+ else if (grpchg->pszNewName != NULL && grpchg->pszOldName != NULL) {
char* szOldName = mir_utf8encodeT(grpchg->pszOldName);
unsigned short group_id = group_list.find_id(szOldName);
- if (group_id)
- {
+ if (group_id) {
char* szNewName = mir_utf8encodeT(grpchg->pszNewName);
update_server_group(szNewName, group_id);
mir_free(szNewName);
@@ -233,63 +224,54 @@ int CAimProto::OnGroupChange(WPARAM wParam,LPARAM lParam)
mir_free(szOldName);
}
}
- else
- {
- if (is_my_contact(hContact) && getBuddyId(hContact, 1) && !db_get_b(hContact, MOD_KEY_CL, AIM_KEY_NL, 0))
- {
- if (grpchg->pszNewName)
- {
+ else {
+ if (is_my_contact(hContact) && getBuddyId(hContact, 1) && !db_get_b(hContact, MOD_KEY_CL, AIM_KEY_NL, 0)) {
+ if (grpchg->pszNewName) {
char* szNewName = mir_utf8encodeT(grpchg->pszNewName);
add_contact_to_group(hContact, szNewName);
mir_free(szNewName);
}
- else
- add_contact_to_group(hContact, AIM_DEFAULT_GROUP);
+ else add_contact_to_group(hContact, AIM_DEFAULT_GROUP);
}
}
return 0;
}
-INT_PTR CAimProto::AddToServerList(WPARAM wParam, LPARAM /*lParam*/)
+INT_PTR CAimProto::AddToServerList(WPARAM hContact, LPARAM)
{
if (state != 1) return 0;
- MCONTACT hContact = wParam;
DBVARIANT dbv;
- if (!db_get_utf(hContact, MOD_KEY_CL, OTH_KEY_GP, &dbv) && dbv.pszVal[0])
- {
+ if (!db_get_utf(hContact, MOD_KEY_CL, OTH_KEY_GP, &dbv) && dbv.pszVal[0]) {
add_contact_to_group(hContact, dbv.pszVal);
db_free(&dbv);
}
- else
- add_contact_to_group(hContact, AIM_DEFAULT_GROUP);
+ else add_contact_to_group(hContact, AIM_DEFAULT_GROUP);
return 0;
}
-INT_PTR CAimProto::BlockBuddy(WPARAM wParam, LPARAM /*lParam*/)
+INT_PTR CAimProto::BlockBuddy(WPARAM hContact, LPARAM)
{
- if (state != 1) return 0;
+ if (state != 1)
+ return 0;
- MCONTACT hContact = wParam;
unsigned short item_id;
DBVARIANT dbv;
- if (getString(hContact, AIM_KEY_SN, &dbv)) return 0;
+ if (getString(hContact, AIM_KEY_SN, &dbv))
+ return 0;
- switch(pd_mode)
- {
+ switch(pd_mode) {
case 1:
pd_mode = 4;
aim_set_pd_info(hServerConn, seqno);
case 4:
item_id = block_list.find_id(dbv.pszVal);
- if (item_id != 0)
- {
+ if (item_id != 0) {
block_list.remove_by_id(item_id);
aim_delete_contact(hServerConn, seqno, dbv.pszVal, item_id, 0, 3, false);
}
- else
- {
+ else {
item_id = block_list.add(dbv.pszVal);
aim_add_contact(hServerConn, seqno, dbv.pszVal, item_id, 0, 3, false);
}
@@ -301,13 +283,11 @@ INT_PTR CAimProto::BlockBuddy(WPARAM wParam, LPARAM /*lParam*/)
case 3:
item_id = allow_list.find_id(dbv.pszVal);
- if (item_id != 0)
- {
+ if (item_id != 0) {
allow_list.remove_by_id(item_id);
aim_delete_contact(hServerConn, seqno, dbv.pszVal, item_id, 0, 2, false);
}
- else
- {
+ else {
item_id = allow_list.add(dbv.pszVal);
aim_add_contact(hServerConn, seqno, dbv.pszVal, item_id, 0, 2);
}
@@ -318,18 +298,16 @@ INT_PTR CAimProto::BlockBuddy(WPARAM wParam, LPARAM /*lParam*/)
return 0;
}
- INT_PTR CAimProto::JoinChatUI(WPARAM /*wParam*/, LPARAM /*lParam*/)
+ INT_PTR CAimProto::JoinChatUI(WPARAM, LPARAM)
{
DialogBoxParam(hInstance, MAKEINTRESOURCE(IDD_CHAT), NULL, join_chat_dialog, LPARAM(this));
return 0;
}
-INT_PTR CAimProto::OnJoinChat(WPARAM wParam, LPARAM /*lParam*/)
+INT_PTR CAimProto::OnJoinChat(WPARAM hContact, LPARAM)
{
if (state != 1) return 0;
- MCONTACT hContact = wParam;
-
DBVARIANT dbv;
if (!getString(hContact, "ChatRoomID", &dbv))
{
@@ -340,7 +318,7 @@ INT_PTR CAimProto::OnJoinChat(WPARAM wParam, LPARAM /*lParam*/)
return 0;
}
-INT_PTR CAimProto::OnLeaveChat(WPARAM wParam, LPARAM /*lParam*/)
+INT_PTR CAimProto::OnLeaveChat(WPARAM wParam, LPARAM)
{
if (state != 1) return 0;
@@ -355,13 +333,13 @@ INT_PTR CAimProto::OnLeaveChat(WPARAM wParam, LPARAM /*lParam*/)
return 0;
}
-INT_PTR CAimProto::InstantIdle(WPARAM /*wParam*/, LPARAM /*lParam*/)
+INT_PTR CAimProto::InstantIdle(WPARAM, LPARAM)
{
DialogBoxParam(hInstance, MAKEINTRESOURCE(IDD_IDLE), NULL, instant_idle_dialog, LPARAM(this));
return 0;
}
-INT_PTR CAimProto::ManageAccount(WPARAM /*wParam*/, LPARAM /*lParam*/)
+INT_PTR CAimProto::ManageAccount(WPARAM, LPARAM)
{
ShellExecuteA(NULL, "open", "https://my.screenname.aol.com", NULL, NULL, SW_SHOW);
return 0;
diff --git a/protocols/AimOscar/src/theme.cpp b/protocols/AimOscar/src/theme.cpp
index d8c052591c..b3470d8ec9 100644
--- a/protocols/AimOscar/src/theme.cpp
+++ b/protocols/AimOscar/src/theme.cpp
@@ -177,9 +177,8 @@ void InitExtraIcons(void)
/////////////////////////////////////////////////////////////////////////////////////////
// OnPreBuildContactMenu
-int CAimProto::OnPreBuildContactMenu(WPARAM wParam,LPARAM /*lParam*/)
+int CAimProto::OnPreBuildContactMenu(WPARAM hContact, LPARAM)
{
- MCONTACT hContact = wParam;
bool bIsChatRoom = isChatRoom(hContact);
//see if we should add the html away message context menu items
diff --git a/protocols/AimOscar/src/ui.cpp b/protocols/AimOscar/src/ui.cpp
index fbcf065d70..5e5a4fd7f5 100644
--- a/protocols/AimOscar/src/ui.cpp
+++ b/protocols/AimOscar/src/ui.cpp
@@ -766,7 +766,7 @@ int CAimProto::OnUserInfoInit(WPARAM wParam,LPARAM lParam)
return 0;
}
-INT_PTR CAimProto::EditProfile(WPARAM /*wParam*/, LPARAM /*lParam*/)
+INT_PTR CAimProto::EditProfile(WPARAM, LPARAM)
{
DialogBoxParam(hInstance, MAKEINTRESOURCE(IDD_AIM), NULL, userinfo_dialog, LPARAM(this));
return 0;
diff --git a/protocols/FacebookRM/src/chat.cpp b/protocols/FacebookRM/src/chat.cpp
index 99d4e96610..e2a553cbcc 100644
--- a/protocols/FacebookRM/src/chat.cpp
+++ b/protocols/FacebookRM/src/chat.cpp
@@ -246,10 +246,8 @@ void FacebookProto::AddChat(const TCHAR *tid, const TCHAR *tname)
CallServiceSync(MS_GC_EVENT,SESSION_ONLINE, reinterpret_cast<LPARAM>(&gce));
}
-INT_PTR FacebookProto::OnJoinChat(WPARAM wParam,LPARAM suppress)
+INT_PTR FacebookProto::OnJoinChat(WPARAM hContact, LPARAM suppress)
{
- MCONTACT hContact = wParam;
-
// TODO: load info from server + old history,...
ptrT idT( getTStringA(hContact, "ChatRoomID"));
diff --git a/protocols/GTalkExt/src/avatar.cpp b/protocols/GTalkExt/src/avatar.cpp
index 4755c3da0a..e3ded257f1 100644
--- a/protocols/GTalkExt/src/avatar.cpp
+++ b/protocols/GTalkExt/src/avatar.cpp
@@ -105,13 +105,13 @@ VOID CALLBACK CallSetAvatar(PVOID lpParameter, BOOLEAN TimerOrWaitFired)
}
}
-int AvaChanged(WPARAM wParam, LPARAM lParam)
+int AvaChanged(WPARAM hContact, LPARAM lParam)
{
- if (!lParam && db_get_b(wParam, SHORT_PLUGIN_NAME, PSEUDOCONTACT_FLAG, 0)) {
+ if (!lParam && db_get_b(hContact, SHORT_PLUGIN_NAME, PSEUDOCONTACT_FLAG, 0)) {
BOOL enqueued = FALSE;
AVACHANGED *ach = (AVACHANGED*)malloc(sizeof(AVACHANGED));
__try {
- ach->hContact = wParam;
+ ach->hContact = hContact;
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 8e31d7bf89..96ac5e94e6 100644
--- a/protocols/GTalkExt/src/handlers.cpp
+++ b/protocols/GTalkExt/src/handlers.cpp
@@ -424,10 +424,9 @@ int OnExtListInit(WPARAM wParam, LPARAM lParam)
// for our pseudo contact only our own popups are allowed
// 0 = allowed, 1 = disallowed
-int OnFilterPopup(WPARAM wParam, LPARAM lParam)
+int OnFilterPopup(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
- if ( !db_get_b(hContact, SHORT_PLUGIN_NAME, PSEUDOCONTACT_FLAG, 0))
+ if (!db_get_b(hContact, SHORT_PLUGIN_NAME, PSEUDOCONTACT_FLAG, 0))
return 0;
return (lParam != (LPARAM)&PopupProc);
diff --git a/protocols/Gadu-Gadu/src/core.cpp b/protocols/Gadu-Gadu/src/core.cpp
index 886c8b2493..b768be5271 100644
--- a/protocols/Gadu-Gadu/src/core.cpp
+++ b/protocols/Gadu-Gadu/src/core.cpp
@@ -1270,9 +1270,8 @@ void GGPROTO::broadcastnewstatus(int newStatus)
////////////////////////////////////////////////////////////
// When contact is deleted
-int GGPROTO::contactdeleted(WPARAM wParam, LPARAM lParam)
+int GGPROTO::contactdeleted(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
uin_t uin = (uin_t)getDword(hContact, GG_KEY_UIN, 0);
// Terminate conference if contact is deleted
@@ -1324,10 +1323,9 @@ static TCHAR* sttSettingToTchar( DBVARIANT* value )
return NULL;
}
-int GGPROTO::dbsettingchanged(WPARAM wParam, LPARAM lParam)
+int GGPROTO::dbsettingchanged(WPARAM hContact, LPARAM lParam)
{
DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING *) lParam;
- MCONTACT hContact = wParam;
char *szProto = NULL;
debugLogA("dbsettingchanged(): fired. szModule=%s szSetting=%s", cws->szModule, cws->szSetting);
diff --git a/protocols/Gadu-Gadu/src/gg.cpp b/protocols/Gadu-Gadu/src/gg.cpp
index 46d93a75b8..6cdb929f0f 100644
--- a/protocols/Gadu-Gadu/src/gg.cpp
+++ b/protocols/Gadu-Gadu/src/gg.cpp
@@ -211,9 +211,8 @@ static GGPROTO* gg_getprotoinstance(MCONTACT hContact)
//////////////////////////////////////////////////////////
// Handles PrebuildContactMenu event
-static int gg_prebuildcontactmenu(WPARAM wParam, LPARAM lParam)
+static int gg_prebuildcontactmenu(WPARAM hContact, LPARAM lParam)
{
- const MCONTACT hContact = wParam;
GGPROTO* gg = gg_getprotoinstance(hContact);
if (gg == NULL)
return 0;
@@ -230,9 +229,8 @@ static int gg_prebuildcontactmenu(WPARAM wParam, LPARAM lParam)
//////////////////////////////////////////////////////////
// Contact block service function
-INT_PTR GGPROTO::blockuser(WPARAM wParam, LPARAM lParam)
+INT_PTR GGPROTO::blockuser(WPARAM hContact, LPARAM lParam)
{
- 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 5c874800db..951ca3bbf0 100644
--- a/protocols/Gadu-Gadu/src/image.cpp
+++ b/protocols/Gadu-Gadu/src/image.cpp
@@ -1171,9 +1171,8 @@ BOOL GGPROTO::img_sendonrequest(gg_event* e)
////////////////////////////////////////////////////////////////////////////
// Send Image : Run (Thread and main)
-INT_PTR GGPROTO::img_sendimg(WPARAM wParam, LPARAM lParam)
+INT_PTR GGPROTO::img_sendimg(WPARAM hContact, LPARAM lParam)
{
- 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 67afbfcf27..5abefd614f 100644
--- a/protocols/Gadu-Gadu/src/services.cpp
+++ b/protocols/Gadu-Gadu/src/services.cpp
@@ -380,9 +380,8 @@ INT_PTR GGPROTO::get_acc_mgr_gui(WPARAM wParam, LPARAM lParam)
// leaves (terminates) conference
// registered as ProtoService PS_LEAVECHAT
-INT_PTR GGPROTO::leavechat(WPARAM wParam, LPARAM lParam)
+INT_PTR GGPROTO::leavechat(WPARAM hContact, LPARAM lParam)
{
- 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 b4b680b455..1b922570d8 100644
--- a/protocols/IRCG/src/services.cpp
+++ b/protocols/IRCG/src/services.cpp
@@ -931,10 +931,9 @@ int __cdecl CIrcProto::OnPreShutdown(WPARAM, LPARAM)
return 0;
}
-int __cdecl CIrcProto::OnMenuPreBuild(WPARAM wParam, LPARAM)
+int __cdecl CIrcProto::OnMenuPreBuild(WPARAM hContact, LPARAM)
{
DBVARIANT dbv;
- MCONTACT hContact = wParam;
if (hContact == NULL)
return 0;
@@ -976,9 +975,8 @@ int __cdecl CIrcProto::OnMenuPreBuild(WPARAM wParam, LPARAM)
return 0;
}
-int __cdecl CIrcProto::OnDbSettingChanged(WPARAM wParam, LPARAM lParam)
+int __cdecl CIrcProto::OnDbSettingChanged(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
if (hContact == NULL || !IsConnected())
return 0;
diff --git a/protocols/IcqOscarJ/src/icq_menu.cpp b/protocols/IcqOscarJ/src/icq_menu.cpp
index b23bed9fd5..473629a4d3 100644
--- a/protocols/IcqOscarJ/src/icq_menu.cpp
+++ b/protocols/IcqOscarJ/src/icq_menu.cpp
@@ -175,9 +175,8 @@ void g_MenuUninit(void)
}
-INT_PTR CIcqProto::OpenWebProfile(WPARAM wParam, LPARAM lParam)
+INT_PTR CIcqProto::OpenWebProfile(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
DWORD dwUin = getContactUin(hContact);
char url[256];
mir_snprintf(url, sizeof(url), "http://www.icq.com/people/%d",dwUin);
@@ -185,9 +184,8 @@ INT_PTR CIcqProto::OpenWebProfile(WPARAM wParam, LPARAM lParam)
}
-int CIcqProto::OnPreBuildContactMenu(WPARAM wParam, LPARAM)
+int CIcqProto::OnPreBuildContactMenu(WPARAM hContact, LPARAM)
{
- 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 71745e80a6..dd0bdaa3ee 100644
--- a/protocols/IcqOscarJ/src/icq_servlist.cpp
+++ b/protocols/IcqOscarJ/src/icq_servlist.cpp
@@ -2618,24 +2618,21 @@ int CIcqProto::ServListDbSettingChanged(WPARAM wParam, LPARAM lParam)
}
-int CIcqProto::ServListDbContactDeleted(WPARAM wParam, LPARAM lParam)
+int CIcqProto::ServListDbContactDeleted(WPARAM hContact, LPARAM lParam)
{
#ifdef _DEBUG
- debugLogA("DB-Events: Contact %x deleted.", wParam);
+ debugLogA("DB-Events: Contact %x deleted.", hContact);
#endif
- DeleteFromContactsCache(wParam);
+ DeleteFromContactsCache(hContact);
if ( !icqOnline() && m_bSsiEnabled)
- { // contact was deleted only locally - retrieve full list on next connect
- setWord(wParam, "SrvRecordCount", 0);
- }
+ // contact was deleted only locally - retrieve full list on next connect
+ setWord(hContact, "SrvRecordCount", 0);
if ( !icqOnline() || !m_bSsiEnabled)
return 0;
- MCONTACT hContact = wParam;
-
// we need all server contacts on local buddy list
DWORD dwUIN;
uid_str szUID;
@@ -2672,9 +2669,8 @@ int CIcqProto::ServListDbContactDeleted(WPARAM wParam, LPARAM lParam)
}
-int CIcqProto::ServListCListGroupChange(WPARAM wParam, LPARAM lParam)
+int CIcqProto::ServListCListGroupChange(WPARAM hContact, LPARAM lParam)
{
- 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 4f14141bc0..07490019c1 100644
--- a/protocols/IcqOscarJ/src/icq_xstatus.cpp
+++ b/protocols/IcqOscarJ/src/icq_xstatus.cpp
@@ -907,12 +907,12 @@ void InitXStatusIcons()
memset(hXStatusCListIcons, -1, sizeof(hXStatusCListIcons));
}
-INT_PTR CIcqProto::ShowXStatusDetails(WPARAM wParam, LPARAM lParam)
+INT_PTR CIcqProto::ShowXStatusDetails(WPARAM hContact, LPARAM lParam)
{
InitXStatusData init;
init.ppro = this;
init.bAction = 1; // retrieve
- init.hContact = wParam;
+ init.hContact = hContact;
CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_SETXSTATUS), NULL, SetXStatusDlgProc, (LPARAM)&init);
return 0;
@@ -968,14 +968,14 @@ INT_PTR CIcqProto::SetXStatusEx(WPARAM wParam, LPARAM lParam)
return 0; // Success
}
-INT_PTR CIcqProto::GetXStatusEx(WPARAM wParam, LPARAM lParam)
+INT_PTR CIcqProto::GetXStatusEx(WPARAM hContact, LPARAM lParam)
{
- CUSTOM_STATUS *pData = (CUSTOM_STATUS*)lParam;
- MCONTACT hContact = wParam;
-
- if (!m_bXStatusEnabled && !m_bMoodsEnabled) return 1;
+ if (!m_bXStatusEnabled && !m_bMoodsEnabled)
+ return 1;
- if (pData->cbSize < sizeof(CUSTOM_STATUS)) return 1; // Failure
+ CUSTOM_STATUS *pData = (CUSTOM_STATUS*)lParam;
+ if (pData->cbSize < sizeof(CUSTOM_STATUS))
+ return 1; // Failure
// fill status member
if (pData->flags & CSSF_MASK_STATUS)
@@ -1086,10 +1086,8 @@ INT_PTR CIcqProto::GetXStatusIcon(WPARAM wParam, LPARAM lParam)
return 0;
}
-INT_PTR CIcqProto::RequestXStatusDetails(WPARAM wParam, LPARAM lParam)
+INT_PTR CIcqProto::RequestXStatusDetails(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
-
if (!m_bXStatusEnabled)
return 0;
diff --git a/protocols/IcqOscarJ/src/icqosc_svcs.cpp b/protocols/IcqOscarJ/src/icqosc_svcs.cpp
index d70f103374..c261468d5c 100644
--- a/protocols/IcqOscarJ/src/icqosc_svcs.cpp
+++ b/protocols/IcqOscarJ/src/icqosc_svcs.cpp
@@ -710,11 +710,10 @@ INT_PTR __cdecl CIcqProto::IcqAddCapability(WPARAM wParam, LPARAM lParam)
}
-INT_PTR __cdecl CIcqProto::IcqCheckCapability(WPARAM wParam, LPARAM lParam)
+INT_PTR __cdecl CIcqProto::IcqCheckCapability(WPARAM hContact, LPARAM lParam)
{
int res = 0;
DBVARIANT dbvariant;
- 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 052f2d9692..0c745d950c 100644
--- a/protocols/JabberG/src/jabber_adhoc.cpp
+++ b/protocols/JabberG/src/jabber_adhoc.cpp
@@ -508,14 +508,13 @@ static INT_PTR CALLBACK JabberAdHoc_CommandDlgProc(HWND hwndDlg, UINT msg, WPARA
return FALSE;
}
-int __cdecl CJabberProto::ContactMenuRunCommands(WPARAM wParam, LPARAM lParam)
+int __cdecl CJabberProto::ContactMenuRunCommands(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
int res = -1;
if ((hContact != NULL || lParam != 0) && m_bJabberOnline) {
ptrT szJid(getTStringA(hContact, "jid"));
- if (wParam && szJid != NULL) {
+ if (hContact && szJid != NULL) {
JABBER_LIST_ITEM *item = NULL;
int selected = 0;
TCHAR jid[JABBER_MAX_JID_LEN];
diff --git a/protocols/JabberG/src/jabber_events.cpp b/protocols/JabberG/src/jabber_events.cpp
index 594224512b..86bb7689f0 100644
--- a/protocols/JabberG/src/jabber_events.cpp
+++ b/protocols/JabberG/src/jabber_events.cpp
@@ -31,12 +31,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
/////////////////////////////////////////////////////////////////////////////////////////
// OnContactDeleted - processes a contact deletion
-int CJabberProto::OnContactDeleted(WPARAM wParam, LPARAM)
+int CJabberProto::OnContactDeleted(WPARAM hContact, LPARAM)
{
if (!m_bJabberOnline) // should never happen
return 0;
- MCONTACT hContact = wParam;
ptrT jid(getTStringA(hContact, isChatRoom(hContact) ? "ChatRoomID" : "jid"));
if (jid == NULL)
return 0;
@@ -157,9 +156,8 @@ void __cdecl CJabberProto::OnAddContactForever(DBCONTACTWRITESETTING *cws, MCONT
db_unset(hContact, "CList", "Hidden");
}
-int __cdecl CJabberProto::OnDbSettingChanged(WPARAM wParam, LPARAM lParam)
+int __cdecl CJabberProto::OnDbSettingChanged(WPARAM hContact, LPARAM lParam)
{
- 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 0e8d20f019..7c58fd7c30 100644
--- a/protocols/JabberG/src/jabber_groupchat.cpp
+++ b/protocols/JabberG/src/jabber_groupchat.cpp
@@ -183,9 +183,8 @@ INT_PTR __cdecl CJabberProto::OnMenuHandleJoinGroupchat(WPARAM, LPARAM)
return 0;
}
-INT_PTR __cdecl CJabberProto::OnJoinChat(WPARAM wParam, LPARAM)
+INT_PTR __cdecl CJabberProto::OnJoinChat(WPARAM hContact, LPARAM)
{
- MCONTACT hContact = wParam;
ptrT jid( getTStringA(hContact, "ChatRoomID"));
if (jid == NULL)
return 0;
@@ -208,9 +207,8 @@ INT_PTR __cdecl CJabberProto::OnJoinChat(WPARAM wParam, LPARAM)
return 0;
}
-INT_PTR __cdecl CJabberProto::OnLeaveChat(WPARAM wParam, LPARAM)
+INT_PTR __cdecl CJabberProto::OnLeaveChat(WPARAM hContact, LPARAM)
{
- 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 b535cb0d47..c57c42dc90 100644
--- a/protocols/JabberG/src/jabber_icolib.cpp
+++ b/protocols/JabberG/src/jabber_icolib.cpp
@@ -391,9 +391,8 @@ int CJabberProto::OnReloadIcons(WPARAM, LPARAM)
// if imagelist require advanced painting status overlay(like xStatus)
// index should be shifted to HIWORD, LOWORD should be 0
-INT_PTR __cdecl CJabberProto::JGetAdvancedStatusIcon(WPARAM wParam, LPARAM)
+INT_PTR __cdecl CJabberProto::JGetAdvancedStatusIcon(WPARAM hContact, LPARAM)
{
- MCONTACT hContact = wParam;
if (!hContact)
return -1;
diff --git a/protocols/JabberG/src/jabber_menu.cpp b/protocols/JabberG/src/jabber_menu.cpp
index 066a03f2a1..f1d507f208 100644
--- a/protocols/JabberG/src/jabber_menu.cpp
+++ b/protocols/JabberG/src/jabber_menu.cpp
@@ -345,9 +345,8 @@ void g_MenuUninit(void)
/////////////////////////////////////////////////////////////////////////////////////////
// contact menu services
-int CJabberProto::OnPrebuildContactMenu(WPARAM wParam, LPARAM)
+int CJabberProto::OnPrebuildContactMenu(WPARAM hContact, LPARAM)
{
- MCONTACT hContact = wParam;
if (hContact == NULL)
return 0;
@@ -477,9 +476,8 @@ int CJabberProto::OnPrebuildContactMenu(WPARAM wParam, LPARAM)
return 0;
}
-INT_PTR __cdecl CJabberProto::OnMenuConvertChatContact(WPARAM wParam, LPARAM)
+INT_PTR __cdecl CJabberProto::OnMenuConvertChatContact(WPARAM hContact, LPARAM)
{
- MCONTACT hContact = wParam;
BYTE bIsChatRoom = isChatRoom(hContact);
const char *szSetting = (bIsChatRoom) ? "ChatRoomID" : "jid";
@@ -492,9 +490,8 @@ INT_PTR __cdecl CJabberProto::OnMenuConvertChatContact(WPARAM wParam, LPARAM)
return 0;
}
-INT_PTR __cdecl CJabberProto::OnMenuRosterAdd(WPARAM wParam, LPARAM)
+INT_PTR __cdecl CJabberProto::OnMenuRosterAdd(WPARAM hContact, LPARAM)
{
- MCONTACT hContact = wParam;
if (!hContact)
return 0; // we do not add ourself to the roster. (buggy situation - should not happen)
@@ -522,9 +519,8 @@ INT_PTR __cdecl CJabberProto::OnMenuRosterAdd(WPARAM wParam, LPARAM)
return 0;
}
-INT_PTR __cdecl CJabberProto::OnMenuHandleRequestAuth(WPARAM wParam, LPARAM)
+INT_PTR __cdecl CJabberProto::OnMenuHandleRequestAuth(WPARAM hContact, LPARAM)
{
- MCONTACT hContact = wParam;
if (hContact != NULL && m_bJabberOnline) {
ptrT jid(getTStringA(hContact, "jid"));
if (jid != NULL)
@@ -533,9 +529,8 @@ INT_PTR __cdecl CJabberProto::OnMenuHandleRequestAuth(WPARAM wParam, LPARAM)
return 0;
}
-INT_PTR __cdecl CJabberProto::OnMenuHandleGrantAuth(WPARAM wParam, LPARAM)
+INT_PTR __cdecl CJabberProto::OnMenuHandleGrantAuth(WPARAM hContact, LPARAM)
{
- MCONTACT hContact = wParam;
if (hContact != NULL && m_bJabberOnline) {
ptrT jid(getTStringA(hContact, "jid"));
if (jid != NULL)
@@ -544,9 +539,8 @@ INT_PTR __cdecl CJabberProto::OnMenuHandleGrantAuth(WPARAM wParam, LPARAM)
return 0;
}
-INT_PTR __cdecl CJabberProto::OnMenuRevokeAuth(WPARAM wParam, LPARAM)
+INT_PTR __cdecl CJabberProto::OnMenuRevokeAuth(WPARAM hContact, LPARAM)
{
- MCONTACT hContact = wParam;
if (hContact != NULL && m_bJabberOnline) {
ptrT jid(getTStringA(hContact, "jid"));
if (jid != NULL)
@@ -555,9 +549,8 @@ INT_PTR __cdecl CJabberProto::OnMenuRevokeAuth(WPARAM wParam, LPARAM)
return 0;
}
-INT_PTR __cdecl CJabberProto::OnMenuTransportLogin(WPARAM wParam, LPARAM)
+INT_PTR __cdecl CJabberProto::OnMenuTransportLogin(WPARAM hContact, LPARAM)
{
- MCONTACT hContact = wParam;
if (!getByte(hContact, "IsTransport", 0))
return 0;
@@ -571,9 +564,8 @@ INT_PTR __cdecl CJabberProto::OnMenuTransportLogin(WPARAM wParam, LPARAM)
return 0;
}
-INT_PTR __cdecl CJabberProto::OnMenuTransportResolve(WPARAM wParam, LPARAM)
+INT_PTR __cdecl CJabberProto::OnMenuTransportResolve(WPARAM hContact, LPARAM)
{
- MCONTACT hContact = wParam;
if (!getByte(hContact, "IsTransport", 0))
return 0;
@@ -583,9 +575,8 @@ INT_PTR __cdecl CJabberProto::OnMenuTransportResolve(WPARAM wParam, LPARAM)
return 0;
}
-INT_PTR __cdecl CJabberProto::OnMenuBookmarkAdd(WPARAM wParam, LPARAM)
+INT_PTR __cdecl CJabberProto::OnMenuBookmarkAdd(WPARAM hContact, LPARAM)
{
- MCONTACT hContact = wParam;
if (!hContact)
return 0; // we do not add ourself to the roster. (buggy situation - should not happen)
@@ -1037,13 +1028,12 @@ int CJabberProto::OnProcessSrmmEvent(WPARAM, LPARAM lParam)
return 0;
}
-int CJabberProto::OnProcessSrmmIconClick(WPARAM wParam, LPARAM lParam)
+int CJabberProto::OnProcessSrmmIconClick(WPARAM hContact, LPARAM lParam)
{
StatusIconClickData *sicd = (StatusIconClickData *)lParam;
if (lstrcmpA(sicd->szModule, m_szModuleName))
return 0;
- MCONTACT hContact = wParam;
if (!hContact)
return 0;
@@ -1092,12 +1082,11 @@ int CJabberProto::OnProcessSrmmIconClick(WPARAM wParam, LPARAM lParam)
return 0;
}
-INT_PTR __cdecl CJabberProto::OnMenuHandleResource(WPARAM wParam, LPARAM, LPARAM res)
+INT_PTR __cdecl CJabberProto::OnMenuHandleResource(WPARAM hContact, LPARAM, LPARAM res)
{
- if (!m_bJabberOnline || !wParam)
+ if (!m_bJabberOnline || !hContact)
return 0;
- MCONTACT hContact = wParam;
ptrT tszJid(getTStringA(hContact, "jid"));
if (tszJid == NULL)
return 0;
@@ -1124,13 +1113,11 @@ INT_PTR __cdecl CJabberProto::OnMenuHandleResource(WPARAM wParam, LPARAM, LPARAM
return 0;
}
-INT_PTR __cdecl CJabberProto::OnMenuHandleDirectPresence(WPARAM wParam, LPARAM lParam, LPARAM res)
+INT_PTR __cdecl CJabberProto::OnMenuHandleDirectPresence(WPARAM hContact, LPARAM lParam, LPARAM res)
{
- if (!m_bJabberOnline || !wParam)
+ if (!m_bJabberOnline || !hContact)
return 0;
- MCONTACT hContact = wParam;
-
TCHAR *jid, text[1024];
ptrT tszJid(getTStringA(hContact, "jid"));
if (tszJid == NULL) {
diff --git a/protocols/JabberG/src/jabber_svc.cpp b/protocols/JabberG/src/jabber_svc.cpp
index 442cf5d0e4..59f9086632 100644
--- a/protocols/JabberG/src/jabber_svc.cpp
+++ b/protocols/JabberG/src/jabber_svc.cpp
@@ -533,12 +533,11 @@ INT_PTR __cdecl CJabberProto::JabberServiceParseXmppURI(WPARAM, LPARAM lParam)
}
// XEP-0224 support (Attention/Nudge)
-INT_PTR __cdecl CJabberProto::JabberSendNudge(WPARAM wParam, LPARAM)
+INT_PTR __cdecl CJabberProto::JabberSendNudge(WPARAM hContact, LPARAM)
{
if (!m_bJabberOnline)
return 0;
- MCONTACT hContact = wParam;
ptrT jid( getTStringA(hContact, "jid"));
if (jid == NULL)
return 0;
diff --git a/protocols/JabberG/src/jabber_xstatus.cpp b/protocols/JabberG/src/jabber_xstatus.cpp
index d5ac96a819..4d2bd7942e 100644
--- a/protocols/JabberG/src/jabber_xstatus.cpp
+++ b/protocols/JabberG/src/jabber_xstatus.cpp
@@ -1329,7 +1329,7 @@ void CJabberProto::XStatusInit()
/////////////////////////////////////////////////////////////////////////////////////////
// JabberSetXStatus - sets the extended status info (mood)
-INT_PTR __cdecl CJabberProto::OnGetXStatusEx(WPARAM wParam, LPARAM lParam)
+INT_PTR __cdecl CJabberProto::OnGetXStatusEx(WPARAM hContact, LPARAM lParam)
{
if (!m_bPepSupported || !m_bJabberOnline)
return 1;
@@ -1342,8 +1342,6 @@ INT_PTR __cdecl CJabberProto::OnGetXStatusEx(WPARAM wParam, LPARAM lParam)
if (pepMood == NULL)
return 1;
- MCONTACT hContact = wParam;
-
// fill status member
if (pData->flags & CSSF_MASK_STATUS)
*pData->status = pepMood->m_mode;
diff --git a/protocols/MRA/src/Mra_menus.cpp b/protocols/MRA/src/Mra_menus.cpp
index acb3853288..2caf912b09 100644
--- a/protocols/MRA/src/Mra_menus.cpp
+++ b/protocols/MRA/src/Mra_menus.cpp
@@ -78,9 +78,8 @@ INT_PTR CMraProto::MraRequestAuthForAll(WPARAM wParam, LPARAM lParam)
return 0;
}
-INT_PTR CMraProto::MraRequestAuthorization(WPARAM wParam, LPARAM lParam)
+INT_PTR CMraProto::MraRequestAuthorization(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
if (!hContact)
return 0;
@@ -236,12 +235,11 @@ INT_PTR CMraProto::MraWorld(WPARAM wParam, LPARAM lParam)
/////////////////////////////////////////////////////////////////////////////////////////
-int CMraProto::MraRebuildContactMenu(WPARAM wParam, LPARAM lParam)
+int CMraProto::MraRebuildContactMenu(WPARAM hContact, LPARAM lParam)
{
BOOL bIsContactMRA, bHasEMail, bHasEMailMR, bChatAgent;
DWORD dwContactSeverFlags = 0;
CMStringW blogStatusMsgSize;
- 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 b61e137105..1ffb37e18e 100644
--- a/protocols/MRA/src/Mra_svcs.cpp
+++ b/protocols/MRA/src/Mra_svcs.cpp
@@ -166,9 +166,8 @@ INT_PTR CMraProto::MraXStatusMenu(WPARAM wParam, LPARAM lParam, LPARAM param)
/////////////////////////////////////////////////////////////////////////////////////////
-int CMraProto::MraContactDeleted(WPARAM wParam, LPARAM lParam)
+int CMraProto::MraContactDeleted(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
if (!m_bLoggedIn || !hContact)
return 0;
@@ -186,13 +185,9 @@ int CMraProto::MraContactDeleted(WPARAM wParam, LPARAM lParam)
return 0;
}
-int CMraProto::MraDbSettingChanged(WPARAM wParam, LPARAM lParam)
+int CMraProto::MraDbSettingChanged(WPARAM hContact, LPARAM lParam)
{
- if (!m_bLoggedIn || !lParam)
- return 0;
-
- MCONTACT hContact = wParam;
- if (hContact == NULL)
+ if (!m_bLoggedIn || !lParam || !hContact)
return 0;
DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING*)lParam;
@@ -447,9 +442,8 @@ INT_PTR CMraProto::MraSetXStatusEx(WPARAM wParam, LPARAM lParam)
return iRet;
}
-INT_PTR CMraProto::MraGetXStatusEx(WPARAM wParam, LPARAM lParam)
+INT_PTR CMraProto::MraGetXStatusEx(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
CUSTOM_STATUS *pData = (CUSTOM_STATUS*)lParam;
if (pData->cbSize < sizeof(CUSTOM_STATUS))
@@ -548,11 +542,10 @@ DWORD CMraProto::MraSendNewStatus(DWORD dwStatusMir, DWORD dwXStatusMir, const C
return 0;
}
-INT_PTR CMraProto::MraSendNudge(WPARAM wParam, LPARAM lParam)
+INT_PTR CMraProto::MraSendNudge(WPARAM hContact, LPARAM lParam)
{
- if (m_bLoggedIn && wParam) {
+ if (m_bLoggedIn && hContact) {
LPWSTR lpwszAlarmMessage = TranslateW(MRA_ALARM_MESSAGE);
- MCONTACT hContact = wParam;
CMStringA szEmail;
if (mraGetStringA(hContact, "e-mail", szEmail))
@@ -617,9 +610,8 @@ INT_PTR CMraProto::MraGetMyAvatar(WPARAM wParam, LPARAM lParam)
////////////////////////////////////////////////////////////////////////////////////////////////
// processes clist group removal
-int CMraProto::OnGroupChanged(WPARAM wParam, LPARAM lParam)
+int CMraProto::OnGroupChanged(WPARAM hContact, LPARAM lParam)
{
- 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 723af931a5..c4abdbdcaa 100644
--- a/protocols/MSN/src/msn_menu.cpp
+++ b/protocols/MSN/src/msn_menu.cpp
@@ -30,11 +30,9 @@ HANDLE hNetMeeting, hBlockCom, hSendHotMail, hInviteChat, hViewProfile;
/////////////////////////////////////////////////////////////////////////////////////////
// Block command callback function
-INT_PTR CMsnProto::MsnBlockCommand(WPARAM wParam, LPARAM)
+INT_PTR CMsnProto::MsnBlockCommand(WPARAM hContact, LPARAM)
{
if (msnLoggedIn) {
- MCONTACT hContact = wParam;
-
char tEmail[MSN_MAX_EMAIL_LEN];
db_get_static(hContact, m_szModuleName, "e-mail", tEmail, sizeof(tEmail));
@@ -58,11 +56,9 @@ INT_PTR CMsnProto::MsnGotoInbox(WPARAM, LPARAM)
return 0;
}
-INT_PTR CMsnProto::MsnSendHotmail(WPARAM wParam, LPARAM)
+INT_PTR CMsnProto::MsnSendHotmail(WPARAM hContact, LPARAM)
{
- MCONTACT hContact = wParam;
char szEmail[MSN_MAX_EMAIL_LEN];
-
if (MSN_IsMeByContact(hContact, szEmail))
MsnGotoInbox(0, 0);
else if (msnLoggedIn)
@@ -83,15 +79,13 @@ INT_PTR CMsnProto::MsnSetupAlerts(WPARAM, LPARAM)
/////////////////////////////////////////////////////////////////////////////////////////
// MsnViewProfile - view a contact's profile
-INT_PTR CMsnProto::MsnViewProfile(WPARAM wParam, LPARAM)
+INT_PTR CMsnProto::MsnViewProfile(WPARAM hContact, LPARAM)
{
- MCONTACT hContact = wParam;
char buf[64], *cid;
if (hContact == NULL)
cid = mycid;
- else
- {
+ else {
cid = buf;
if (db_get_static(hContact, m_szModuleName, "CID", buf, 30))
return 0;
@@ -125,14 +119,12 @@ INT_PTR CMsnProto::MsnInviteCommand(WPARAM, LPARAM)
/////////////////////////////////////////////////////////////////////////////////////////
// MsnRebuildContactMenu - gray or ungray the block menus according to contact's status
-int CMsnProto::OnPrebuildContactMenu(WPARAM wParam, LPARAM)
+int CMsnProto::OnPrebuildContactMenu(WPARAM hContact, LPARAM)
{
- MCONTACT hContact = wParam;
- char szEmail[MSN_MAX_EMAIL_LEN];
-
if ( !MSN_IsMyContact(hContact))
return 0;
+ char szEmail[MSN_MAX_EMAIL_LEN];
bool isMe = MSN_IsMeByContact(hContact, szEmail);
if (szEmail[0]) {
int listId = Lists_GetMask(szEmail);
@@ -155,12 +147,10 @@ int CMsnProto::OnPrebuildContactMenu(WPARAM wParam, LPARAM)
return 0;
}
-int CMsnProto::OnContactDoubleClicked(WPARAM wParam, LPARAM)
+int CMsnProto::OnContactDoubleClicked(WPARAM hContact, LPARAM)
{
- MCONTACT hContact = wParam;
-
if (emailEnabled && MSN_IsMeByContact(hContact)) {
- MsnSendHotmail(wParam, 0);
+ MsnSendHotmail(hContact, 0);
return 1;
}
return 0;
diff --git a/protocols/MSN/src/msn_svcs.cpp b/protocols/MSN/src/msn_svcs.cpp
index ec1c2f97b8..9d1be8b0a5 100644
--- a/protocols/MSN/src/msn_svcs.cpp
+++ b/protocols/MSN/src/msn_svcs.cpp
@@ -242,12 +242,10 @@ INT_PTR CMsnProto::SetNickName(WPARAM wParam, LPARAM lParam)
/////////////////////////////////////////////////////////////////////////////////////////
// MsnSendNudge - Sending a nudge
-INT_PTR CMsnProto::SendNudge(WPARAM wParam, LPARAM lParam)
+INT_PTR CMsnProto::SendNudge(WPARAM hContact, LPARAM lParam)
{
if (!msnLoggedIn) return 0;
- MCONTACT hContact = wParam;
-
char tEmail[MSN_MAX_EMAIL_LEN];
if (MSN_IsMeByContact(hContact, tEmail)) return 0;
@@ -378,10 +376,8 @@ INT_PTR CMsnProto::SetCurrentMedia(WPARAM wParam, LPARAM lParam)
/////////////////////////////////////////////////////////////////////////////////////////
// MsnContactDeleted - called when a contact is deleted from list
-int CMsnProto::OnContactDeleted(WPARAM wParam, LPARAM lParam)
+int CMsnProto::OnContactDeleted(WPARAM hContact, LPARAM lParam)
{
- const MCONTACT hContact = wParam;
-
if (!msnLoggedIn) //should never happen for MSN contacts
return 0;
@@ -420,11 +416,10 @@ int CMsnProto::OnContactDeleted(WPARAM wParam, LPARAM lParam)
}
-int CMsnProto::OnGroupChange(WPARAM wParam,LPARAM lParam)
+int CMsnProto::OnGroupChange(WPARAM hContact, LPARAM lParam)
{
if (!msnLoggedIn || !MyOptions.ManageServer) return 0;
- const MCONTACT hContact = wParam;
const CLISTGROUPCHANGE* grpchg = (CLISTGROUPCHANGE*)lParam;
if (hContact == NULL)
@@ -456,9 +451,8 @@ int CMsnProto::OnGroupChange(WPARAM wParam,LPARAM lParam)
/////////////////////////////////////////////////////////////////////////////////////////
// MsnDbSettingChanged - look for contact's settings changes
-int CMsnProto::OnDbSettingChanged(WPARAM wParam,LPARAM lParam)
+int CMsnProto::OnDbSettingChanged(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
DBCONTACTWRITESETTING* cws = (DBCONTACTWRITESETTING*)lParam;
if (!msnLoggedIn)
@@ -617,9 +611,8 @@ INT_PTR CMsnProto::GetUnreadEmailCount(WPARAM wParam, LPARAM lParam)
/////////////////////////////////////////////////////////////////////////////////////////
// OnLeaveChat - closes MSN chat window
-INT_PTR CMsnProto::OnLeaveChat(WPARAM wParam,LPARAM lParam)
+INT_PTR CMsnProto::OnLeaveChat(WPARAM hContact, LPARAM lParam)
{
- 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 5143dcb913..92a9a400d9 100644
--- a/protocols/Tlen/src/tlen.cpp
+++ b/protocols/Tlen/src/tlen.cpp
@@ -112,9 +112,8 @@ static void TlenRegisterIcons()
Icon_Register(hInst, "Protocols/Tlen", iconList, SIZEOF(iconList), "TLEN");
}
-int TlenProtocol::PrebuildContactMenu(WPARAM wParam, LPARAM lParam)
+int TlenProtocol::PrebuildContactMenu(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
if (hContact != NULL && isOnline) {
DBVARIANT dbv;
if (!db_get(hContact, m_szModuleName, "jid", &dbv)) {
@@ -138,9 +137,8 @@ int TlenProtocol::PrebuildContactMenu(WPARAM wParam, LPARAM lParam)
return 0;
}
-INT_PTR TlenProtocol::ContactMenuHandleRequestAuth(WPARAM wParam, LPARAM lParam)
+INT_PTR TlenProtocol::ContactMenuHandleRequestAuth(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
if (hContact != NULL && isOnline) {
DBVARIANT dbv;
if (!db_get(hContact, m_szModuleName, "jid", &dbv)) {
@@ -151,9 +149,8 @@ INT_PTR TlenProtocol::ContactMenuHandleRequestAuth(WPARAM wParam, LPARAM lParam)
return 0;
}
-INT_PTR TlenProtocol::ContactMenuHandleGrantAuth(WPARAM wParam, LPARAM lParam)
+INT_PTR TlenProtocol::ContactMenuHandleGrantAuth(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
if (hContact != NULL && isOnline) {
DBVARIANT dbv;
if (!db_get(hContact, m_szModuleName, "jid", &dbv)) {
@@ -164,12 +161,10 @@ INT_PTR TlenProtocol::ContactMenuHandleGrantAuth(WPARAM wParam, LPARAM lParam)
return 0;
}
-INT_PTR TlenProtocol::ContactMenuHandleSendPicture(WPARAM wParam, LPARAM lParam)
+INT_PTR TlenProtocol::ContactMenuHandleSendPicture(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
if (hContact != NULL && isOnline)
SendPicture(this, hContact);
-
return 0;
}
diff --git a/protocols/Tlen/src/tlen_svc.cpp b/protocols/Tlen/src/tlen_svc.cpp
index 770f668ea4..ef41abccd4 100644
--- a/protocols/Tlen/src/tlen_svc.cpp
+++ b/protocols/Tlen/src/tlen_svc.cpp
@@ -597,9 +597,8 @@ static void __cdecl TlenGetAwayMsgThread(void *ptr)
delete data;
}
-INT_PTR TlenProtocol::SendAlert(WPARAM wParam, LPARAM lParam)
+INT_PTR TlenProtocol::SendAlert(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
DBVARIANT dbv;
if (isOnline && !db_get(hContact, m_szModuleName, "jid", &dbv)) {
TlenSend(this, "<m tp='a' to='%s'/>", dbv.pszVal);
diff --git a/protocols/Twitter/src/contacts.cpp b/protocols/Twitter/src/contacts.cpp
index fb6a41135a..fe0fa53c58 100644
--- a/protocols/Twitter/src/contacts.cpp
+++ b/protocols/Twitter/src/contacts.cpp
@@ -183,13 +183,11 @@ HANDLE TwitterProto::GetAwayMsg(MCONTACT hContact)
return (HANDLE)1;
}
-int TwitterProto::OnContactDeleted(WPARAM wParam,LPARAM lParam)
+int TwitterProto::OnContactDeleted(WPARAM hContact, LPARAM lParam)
{
if(m_iStatus != ID_STATUS_ONLINE)
return 0;
- const MCONTACT hContact = wParam;
-
if(!IsMyContact(hContact))
return 0;
diff --git a/protocols/Twitter/src/proto.cpp b/protocols/Twitter/src/proto.cpp
index b301bc1fb3..8f02b0ba1f 100644
--- a/protocols/Twitter/src/proto.cpp
+++ b/protocols/Twitter/src/proto.cpp
@@ -243,11 +243,9 @@ INT_PTR TwitterProto::GetStatus(WPARAM,LPARAM)
return m_iStatus;
}
-INT_PTR TwitterProto::ReplyToTweet(WPARAM wParam,LPARAM)
+INT_PTR TwitterProto::ReplyToTweet(WPARAM hContact, LPARAM)
{
// TODO: support replying to tweets instead of just users
- MCONTACT hContact = wParam;
-
HWND hDlg = CreateDialogParam(g_hInstance,MAKEINTRESOURCE(IDD_TWEET),0,tweet_proc,reinterpret_cast<LPARAM>(this));
DBVARIANT dbv;
@@ -262,10 +260,8 @@ INT_PTR TwitterProto::ReplyToTweet(WPARAM wParam,LPARAM)
return 0;
}
-INT_PTR TwitterProto::VisitHomepage(WPARAM wParam,LPARAM)
+INT_PTR TwitterProto::VisitHomepage(WPARAM hContact, LPARAM)
{
- MCONTACT hContact = wParam;
-
DBVARIANT dbv;
// TODO: remove this
if( !db_get_s(hContact,m_szModuleName,TWITTER_KEY_UN,&dbv))
@@ -396,9 +392,8 @@ int TwitterProto::OnPreShutdown(WPARAM,LPARAM)
return 0;
}
-int TwitterProto::OnPrebuildContactMenu(WPARAM wParam,LPARAM)
+int TwitterProto::OnPrebuildContactMenu(WPARAM hContact, LPARAM)
{
- MCONTACT hContact = wParam;
if(IsMyContact(hContact))
ShowContactMenus(true);
diff --git a/protocols/Xfire/src/main.cpp b/protocols/Xfire/src/main.cpp
index 4f2e56000c..5087537cb1 100644
--- a/protocols/Xfire/src/main.cpp
+++ b/protocols/Xfire/src/main.cpp
@@ -1335,9 +1335,8 @@ static void SendBadAck( LPVOID param )
ProtoBroadcastAck(protocolname, (MCONTACT)param, ACKTYPE_MESSAGE, ACKRESULT_FAILED, (HANDLE) 0, LPARAM(Translate("XFire does not support offline messaging!")));
}
-static INT_PTR UserIsTyping(WPARAM wParam, LPARAM lParam)
+static INT_PTR UserIsTyping(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
DBVARIANT dbv;
if (lParam==PROTOTYPE_SELFTYPING_ON)
@@ -2069,9 +2068,8 @@ static INT_PTR GotoProfileAct(WPARAM wParam,LPARAM lParam)
return 0;
}
-int RebuildContactMenu( WPARAM wParam, LPARAM lParam )
+int RebuildContactMenu(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
bool bEnabled = true, bEnabled2 = true;
DBVARIANT dbv;
diff --git a/protocols/Yahoo/src/im.cpp b/protocols/Yahoo/src/im.cpp
index 2606576a4e..49b7f108ae 100644
--- a/protocols/Yahoo/src/im.cpp
+++ b/protocols/Yahoo/src/im.cpp
@@ -225,10 +225,8 @@ int __cdecl CYahooProto::RecvMsg(MCONTACT hContact, PROTORECVEVENT* pre)
// Send a nudge
//=======================================================
-INT_PTR __cdecl CYahooProto::SendNudge(WPARAM wParam, LPARAM lParam)
+INT_PTR __cdecl CYahooProto::SendNudge(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
-
debugLogA("[YAHOO_SENDNUDGE]");
if (!m_bLoggedIn) {/* don't send nudge if we not connected! */
diff --git a/protocols/Yahoo/src/services.cpp b/protocols/Yahoo/src/services.cpp
index ad342a2b1e..f5e0aa30dc 100644
--- a/protocols/Yahoo/src/services.cpp
+++ b/protocols/Yahoo/src/services.cpp
@@ -80,11 +80,8 @@ void CYahooProto::BroadcastStatus(int s)
//=======================================================
//Contact deletion event
//=======================================================
-int __cdecl CYahooProto::OnContactDeleted(WPARAM wParam, LPARAM lParam)
+int __cdecl CYahooProto::OnContactDeleted(WPARAM hContact, LPARAM lParam)
{
- DBVARIANT dbv;
- MCONTACT hContact = wParam;
-
debugLogA("[YahooContactDeleted]");
if (!m_bLoggedIn) {//should never happen for Yahoo contacts
@@ -98,6 +95,7 @@ int __cdecl CYahooProto::OnContactDeleted(WPARAM wParam, LPARAM lParam)
return 0;
}
+ DBVARIANT dbv;
if (!getString(hContact, YAHOO_LOGINID, &dbv)) {
debugLogA("[YahooContactDeleted] Removing %s", dbv.pszVal);
remove_buddy(dbv.pszVal, getWord(hContact, "yprotoid", 0));
@@ -495,9 +493,8 @@ void CYahooProto::MenuUninit( void )
CallService(MS_CLIST_REMOVECONTACTMENUITEM, (WPARAM)hShowProfileMenuItem, 0);
}
-int __cdecl CYahooProto::OnPrebuildContactMenu(WPARAM wParam, LPARAM)
+int __cdecl CYahooProto::OnPrebuildContactMenu(WPARAM hContact, LPARAM)
{
- const MCONTACT hContact = wParam;
if (!IsMyContact(hContact)) {
debugLogA("[OnPrebuildContactMenu] Not a Yahoo Contact!!!");
return 0;