summaryrefslogtreecommitdiff
path: root/plugins/Nudge
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 /plugins/Nudge
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 'plugins/Nudge')
-rw-r--r--plugins/Nudge/src/main.cpp28
1 files changed, 13 insertions, 15 deletions
diff --git a/plugins/Nudge/src/main.cpp b/plugins/Nudge/src/main.cpp
index a7a6bec972..c79da2dd8c 100644
--- a/plugins/Nudge/src/main.cpp
+++ b/plugins/Nudge/src/main.cpp
@@ -39,9 +39,8 @@ INT_PTR NudgeShowMenu(WPARAM wParam,LPARAM lParam)
return 0;
}
-INT_PTR NudgeSend(WPARAM wParam, LPARAM lParam)
+INT_PTR NudgeSend(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
char *protoName = GetContactProto(hContact);
int diff = time(NULL) - db_get_dw(hContact, "Nudge", "LastSent", time(NULL) - 30);
if (diff < GlobalNudge.sendTimeSec) {
@@ -68,7 +67,7 @@ INT_PTR NudgeSend(WPARAM wParam, LPARAM lParam)
else if (DefaultNudge.showStatus)
Nudge_SentStatus(DefaultNudge, hContact);
- CallProtoService(protoName, PS_SEND_NUDGE, wParam, lParam);
+ CallProtoService(protoName, PS_SEND_NUDGE, hContact, lParam);
return 0;
}
@@ -79,9 +78,8 @@ void OpenContactList()
ShowWindow(hWnd, SW_SHOW);
}
-int NudgeReceived(WPARAM wParam, LPARAM lParam)
+int NudgeReceived(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
char *protoName = GetContactProto(hContact);
DWORD currentTimestamp = time(NULL);
@@ -100,7 +98,7 @@ int NudgeReceived(WPARAM wParam, LPARAM lParam)
if (!strcmp(protoName, n->item.ProtocolName)) {
if (n->item.enabled) {
- if (n->item.useIgnoreSettings && CallService(MS_IGNORE_ISIGNORED, wParam, IGNOREEVENT_USERONLINE))
+ if (n->item.useIgnoreSettings && CallService(MS_IGNORE_ISIGNORED, hContact, IGNOREEVENT_USERONLINE))
return 0;
DWORD Status = CallProtoService(protoName, PS_GETSTATUS, 0, 0);
@@ -122,13 +120,13 @@ int NudgeReceived(WPARAM wParam, LPARAM lParam)
if (n->item.openContactList)
OpenContactList();
if (n->item.shakeClist)
- ShakeClist(wParam, lParam);
+ ShakeClist(hContact, lParam);
if (n->item.openMessageWindow)
- CallService(MS_MSG_SENDMESSAGET, wParam, 0);
+ CallService(MS_MSG_SENDMESSAGET, hContact, 0);
if (n->item.shakeChat)
- ShakeChat(wParam, lParam);
+ ShakeChat(hContact, lParam);
if (n->item.autoResend)
- mir_forkthread(AutoResendNudge, (void *)wParam);
+ mir_forkthread(AutoResendNudge, (void*)hContact);
SkinPlaySound(n->item.NudgeSoundname);
}
@@ -144,7 +142,7 @@ int NudgeReceived(WPARAM wParam, LPARAM lParam)
}
else {
if (DefaultNudge.enabled) {
- if (DefaultNudge.useIgnoreSettings && CallService(MS_IGNORE_ISIGNORED, wParam, IGNOREEVENT_USERONLINE))
+ if (DefaultNudge.useIgnoreSettings && CallService(MS_IGNORE_ISIGNORED, hContact, IGNOREEVENT_USERONLINE))
return 0;
DWORD Status = CallService(MS_CLIST_GETSTATUSMODE, 0, 0);
@@ -165,13 +163,13 @@ int NudgeReceived(WPARAM wParam, LPARAM lParam)
if (DefaultNudge.openContactList)
OpenContactList();
if (DefaultNudge.shakeClist)
- ShakeClist(wParam, lParam);
+ ShakeClist(hContact, lParam);
if (DefaultNudge.openMessageWindow)
- CallService(MS_MSG_SENDMESSAGET, wParam, 0);
+ CallService(MS_MSG_SENDMESSAGET, hContact, 0);
if (DefaultNudge.shakeChat)
- ShakeChat(wParam, lParam);
+ ShakeChat(hContact, lParam);
if (DefaultNudge.autoResend)
- mir_forkthread(AutoResendNudge, (void *)wParam);
+ mir_forkthread(AutoResendNudge, (void*)hContact);
SkinPlaySound(DefaultNudge.NudgeSoundname);
}