summaryrefslogtreecommitdiff
path: root/plugins/YARelay
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/YARelay')
-rw-r--r--plugins/YARelay/src/main.cpp11
-rw-r--r--plugins/YARelay/src/options.cpp6
-rw-r--r--plugins/YARelay/src/stdafx.h2
3 files changed, 10 insertions, 9 deletions
diff --git a/plugins/YARelay/src/main.cpp b/plugins/YARelay/src/main.cpp
index 34cf80857a..6eee2d60eb 100644
--- a/plugins/YARelay/src/main.cpp
+++ b/plugins/YARelay/src/main.cpp
@@ -25,7 +25,7 @@ CLIST_INTERFACE *pcli;
HINSTANCE hInst;
int hLangpack;
-HANDLE hForwardFrom, hForwardTo;
+HCONTACT hForwardFrom, hForwardTo;
TCHAR tszForwardTemplate[MAXTEMPLATESIZE];
int iSplit, iSplitMaxSize, iSendParts, iMarkRead, iSendAndHistory, iForwardOnStatus;
@@ -89,7 +89,8 @@ int ProtoAck(WPARAM wparam,LPARAM lparam)
*/
static int MessageEventAdded(WPARAM wParam, LPARAM lParam)
{
- HANDLE hContact = (HANDLE)wParam, hDBEvent = (HANDLE)lParam;
+ HCONTACT hContact = (HCONTACT)wParam;
+ HANDLE hDBEvent = (HANDLE)lParam;
// is the message sender accepted for forwarding
if (hForwardFrom != 0 && hForwardFrom != hContact)
@@ -209,7 +210,7 @@ static int MessageEventAdded(WPARAM wParam, LPARAM lParam)
strncpy(szMsgPart, szBuf, cbPortion);
szMsgPart[cbPortion] = 0;
- HANDLE hMsgProc = (HANDLE)CallContactService((HANDLE)hForwardTo, PSS_MESSAGE, PREF_UTF, (LPARAM)szMsgPart);
+ HANDLE hMsgProc = (HANDLE)CallContactService(hForwardTo, PSS_MESSAGE, PREF_UTF, (LPARAM)szMsgPart);
MESSAGE_PROC* msgProc = (MESSAGE_PROC*)mir_alloc(sizeof(MESSAGE_PROC));
msgProc->hProcess = hMsgProc;
@@ -235,8 +236,8 @@ extern "C" int __declspec(dllexport) Load()
mir_getCLI();
// Load plugin options from DB
- hForwardFrom = (HANDLE)db_get_dw(NULL, "yaRelay", "ForwardFrom", 0);
- hForwardTo = (HANDLE)db_get_dw(NULL, "yaRelay", "ForwardTo", 0);
+ hForwardFrom = (HCONTACT)db_get_dw(NULL, "yaRelay", "ForwardFrom", 0);
+ hForwardTo = (HCONTACT)db_get_dw(NULL, "yaRelay", "ForwardTo", 0);
iForwardOnStatus = db_get_dw(NULL, "yaRelay", "ForwardOnStatus", STATUS_OFFLINE | STATUS_AWAY | STATUS_NA);
diff --git a/plugins/YARelay/src/options.cpp b/plugins/YARelay/src/options.cpp
index 4d96a1ca49..eafc4f93b1 100644
--- a/plugins/YARelay/src/options.cpp
+++ b/plugins/YARelay/src/options.cpp
@@ -50,7 +50,7 @@ static void OptionsFrameEnableControls(HWND hwndDlg)
*/
static INT_PTR CALLBACK OptionsFrameProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
- HANDLE hContact;
+ HCONTACT hContact;
int idx;
switch (uMsg) {
case WM_INITDIALOG:
@@ -144,9 +144,9 @@ static INT_PTR CALLBACK OptionsFrameProc(HWND hwndDlg, UINT uMsg, WPARAM wParam,
if (SendMessage(GetDlgItem(hwndDlg, IDC_RADIO_ALL), BM_GETCHECK, 0, 0) == BST_CHECKED)
hForwardFrom = 0;
else
- hForwardFrom = (HANDLE)SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_FROM), CB_GETITEMDATA, SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_FROM), CB_GETCURSEL, 0, 0), 0);
+ hForwardFrom = (HCONTACT)SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_FROM), CB_GETITEMDATA, SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_FROM), CB_GETCURSEL, 0, 0), 0);
- hForwardTo = (HANDLE)SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_TO), CB_GETITEMDATA, SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_TO), CB_GETCURSEL, 0, 0), 0);
+ hForwardTo = (HCONTACT)SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_TO), CB_GETITEMDATA, SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_TO), CB_GETCURSEL, 0, 0), 0);
iForwardOnStatus = 0;
if (SendMessage(GetDlgItem(hwndDlg, IDC_CHECK1), BM_GETCHECK, 0, 0) == BST_CHECKED) iForwardOnStatus |= STATUS_OFFLINE;
if (SendMessage(GetDlgItem(hwndDlg, IDC_CHECK2), BM_GETCHECK, 0, 0) == BST_CHECKED) iForwardOnStatus |= STATUS_ONLINE;
diff --git a/plugins/YARelay/src/stdafx.h b/plugins/YARelay/src/stdafx.h
index cc74ee704e..248f7fe5f1 100644
--- a/plugins/YARelay/src/stdafx.h
+++ b/plugins/YARelay/src/stdafx.h
@@ -48,7 +48,7 @@ Features:
extern HINSTANCE hInst;
-extern HANDLE hForwardFrom, hForwardTo;
+extern HCONTACT hForwardFrom, hForwardTo;
extern TCHAR tszForwardTemplate[MAXTEMPLATESIZE];
extern int iSplit, iSplitMaxSize, iSendParts, iMarkRead, iSendAndHistory, iForwardOnStatus;