From dd6ac172c4f814fa4b5ace6caca80d00d7e01ac8 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 20 Feb 2020 21:23:22 +0300 Subject: bunch of useless threads replaced with a call of ProtoBroadcastAsync --- protocols/Discord/src/proto.cpp | 8 +------- protocols/Discord/src/proto.h | 1 - 2 files changed, 1 insertion(+), 8 deletions(-) (limited to 'protocols/Discord') diff --git a/protocols/Discord/src/proto.cpp b/protocols/Discord/src/proto.cpp index cda830c3d5..626b30088e 100644 --- a/protocols/Discord/src/proto.cpp +++ b/protocols/Discord/src/proto.cpp @@ -386,16 +386,10 @@ MCONTACT CDiscordProto::AddToList(int flags, PROTOSEARCHRESULT *psr) //////////////////////////////////////////////////////////////////////////////////////// // SendMsg -void __cdecl CDiscordProto::SendMessageAckThread(void *param) -{ - Sleep(100); - ProtoBroadcastAck((UINT_PTR)param, ACKTYPE_MESSAGE, ACKRESULT_FAILED, (HANDLE)1, (LPARAM)TranslateT("Protocol is offline or user isn't authorized yet")); -} - int CDiscordProto::SendMsg(MCONTACT hContact, int /*flags*/, const char *pszSrc) { if (!m_bOnline) { - ForkThread(&CDiscordProto::SendMessageAckThread, (void*)hContact); + ProtoBroadcastAsync(hContact, ACKTYPE_MESSAGE, ACKRESULT_FAILED, (HANDLE)1, (LPARAM)TranslateT("Protocol is offline or user isn't authorized yet")); return 1; } diff --git a/protocols/Discord/src/proto.h b/protocols/Discord/src/proto.h index f165ca40c2..e42fe720a1 100644 --- a/protocols/Discord/src/proto.h +++ b/protocols/Discord/src/proto.h @@ -159,7 +159,6 @@ class CDiscordProto : public PROTO void __cdecl SendFileThread(void*); void __cdecl ServerThread(void*); void __cdecl SearchThread(void *param); - void __cdecl SendMessageAckThread(void* param); void __cdecl BatchChatCreate(void* param); void __cdecl GetAwayMsgThread(void *param); -- cgit v1.2.3