diff options
author | George Hazan <ghazan@miranda.im> | 2020-02-20 21:23:22 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2020-02-20 21:23:22 +0300 |
commit | dd6ac172c4f814fa4b5ace6caca80d00d7e01ac8 (patch) | |
tree | 805abd69e64f8e1f268e6415689de8742cac2215 /protocols/Discord | |
parent | 79d99837e0fefa32d695dba7e2a13b8a42f39da2 (diff) |
bunch of useless threads replaced with a call of ProtoBroadcastAsync
Diffstat (limited to 'protocols/Discord')
-rw-r--r-- | protocols/Discord/src/proto.cpp | 8 | ||||
-rw-r--r-- | protocols/Discord/src/proto.h | 1 |
2 files changed, 1 insertions, 8 deletions
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<CDiscordProto> 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); |