diff options
Diffstat (limited to 'protocols/SkypeWeb/src/skype_proto.cpp')
-rw-r--r-- | protocols/SkypeWeb/src/skype_proto.cpp | 36 |
1 files changed, 1 insertions, 35 deletions
diff --git a/protocols/SkypeWeb/src/skype_proto.cpp b/protocols/SkypeWeb/src/skype_proto.cpp index 61b8f2445a..3937a4e6c7 100644 --- a/protocols/SkypeWeb/src/skype_proto.cpp +++ b/protocols/SkypeWeb/src/skype_proto.cpp @@ -116,37 +116,7 @@ HANDLE CSkypeProto::SendFile(MCONTACT hContact, const PROTOCHAR *szDescription, int CSkypeProto::SendMsg(MCONTACT hContact, int flags, const char *msg)
{
- UINT hMessage = InterlockedIncrement(&hMessageProcess); - - SendMessageParam *param = (SendMessageParam*)mir_calloc(sizeof(SendMessageParam)); - param->hContact = hContact; - param->hMessage = (HANDLE)hMessage; - param->msg = msg; - param->flags = flags; - - ForkThread(&CSkypeProto::SendMsgThread, (void*)param); - - return hMessage;
-}
-
-void CSkypeProto::SendMsgThread(void *arg) -{ - SendMessageParam *param = (SendMessageParam*)arg; - - if (!IsOnline()) - { - ProtoBroadcastAck(param->hContact, ACKTYPE_MESSAGE, ACKRESULT_FAILED, param->hMessage, (LPARAM)Translate("You cannot send messages when you are offline.")); - mir_free(param); - return; - } - - CMStringA message = (param->flags & PREF_UNICODE) ? ptrA(mir_utf8encode(param->msg)) : param->msg; // TODO: mir_utf8encode check taken from FacebookRM, is it needed? Usually we get PREF_UTF8 flag instead. - - ptrA token(getStringA("registrationToken")); - ptrA username(getStringA(param->hContact, "Skypename")); - PushRequest( - new SendMsgRequest(token, username, message, getStringA("Server"))/*, - &CSkypeProto::OnMessageSent*/); + return OnSendMessage(hContact, flags, msg);
}
int CSkypeProto::SendUrl(MCONTACT, int, const char*) { return 0; }
@@ -175,18 +145,14 @@ int CSkypeProto::SetStatus(int iNewStatus) requestQueue->Stop();
if (!Miranda_Terminated())
- {
SetAllContactsStatus(ID_STATUS_OFFLINE);
- }
m_iStatus = m_iDesiredStatus = ID_STATUS_OFFLINE;
}
else
{
if (old_status == ID_STATUS_CONNECTING)
- {
return 0;
- }
else if (old_status == ID_STATUS_OFFLINE && m_iStatus == ID_STATUS_OFFLINE)
{
// login
|