summaryrefslogtreecommitdiff
path: root/plugins/Dropbox/src/dropbox_services.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Dropbox/src/dropbox_services.cpp')
-rw-r--r--plugins/Dropbox/src/dropbox_services.cpp21
1 files changed, 12 insertions, 9 deletions
diff --git a/plugins/Dropbox/src/dropbox_services.cpp b/plugins/Dropbox/src/dropbox_services.cpp
index 37b807eedc..c32ebf1802 100644
--- a/plugins/Dropbox/src/dropbox_services.cpp
+++ b/plugins/Dropbox/src/dropbox_services.cpp
@@ -46,11 +46,14 @@ INT_PTR CDropbox::ProtoGetStatus(WPARAM, LPARAM)
INT_PTR CDropbox::ProtoSendFile(WPARAM, LPARAM lParam)
{
- if (!HasAccessToken())
- return ACKRESULT_FAILED;
-
CCSDATA *pccsd = (CCSDATA*)lParam;
+ if (!HasAccessToken())
+ {
+ ProtoBroadcastAck(MODULE, pccsd->hContact, ACKTYPE_FILE, ACKRESULT_FAILED, NULL, (LPARAM)"You cannot send files when you are not authorized.");
+ return 0;
+ }
+
FileTransferParam *ftp = new FileTransferParam();
ftp->pfts.flags |= PFTS_SENDING;
ftp->pfts.hContact = pccsd->hContact;
@@ -124,9 +127,6 @@ INT_PTR CDropbox::ProtoSendFile(WPARAM, LPARAM lParam)
INT_PTR CDropbox::ProtoCancelFile(WPARAM, LPARAM lParam)
{
- if (!HasAccessToken())
- return ACKRESULT_FAILED;
-
CCSDATA *pccsd = (CCSDATA*)lParam;
HANDLE hTransfer = (HANDLE)pccsd->wParam;
@@ -141,11 +141,14 @@ INT_PTR CDropbox::ProtoCancelFile(WPARAM, LPARAM lParam)
INT_PTR CDropbox::ProtoSendMessage(WPARAM, LPARAM lParam)
{
- if (!HasAccessToken())
- return ACKRESULT_FAILED;
-
CCSDATA *pccsd = (CCSDATA*)lParam;
+ if (!HasAccessToken())
+ {
+ ProtoBroadcastAck(MODULE, pccsd->hContact, ACKTYPE_MESSAGE, ACKRESULT_FAILED, NULL, (LPARAM)"You cannot send messages when you are not authorized.");
+ return 0;
+ }
+
char *message = NULL;
char *szMessage = (char*)pccsd->lParam;
if (pccsd->wParam & PREF_UNICODE)