From 45bf5f51cc788cb8f19e1b8fcd5b8818dc7a2e00 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 25 Feb 2019 21:02:11 +0300 Subject: GCEVENT::GCEF_UTF8 - flag for direct communication with utf8-encoded chat events (UTF16LE by default) --- protocols/Discord/src/server.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'protocols/Discord/src/server.cpp') diff --git a/protocols/Discord/src/server.cpp b/protocols/Discord/src/server.cpp index f1d1db3a5e..661e313290 100644 --- a/protocols/Discord/src/server.cpp +++ b/protocols/Discord/src/server.cpp @@ -117,10 +117,11 @@ void CDiscordProto::OnReceiveHistory(NETLIBHTTPREQUEST *pReply, AsyncHttpRequest else { ParseSpecialChars(si, wszText); - GCEVENT gce = { m_szModuleName, pUser->wszUsername, GC_EVENT_MESSAGE }; + GCEVENT gce = { m_szModuleName, 0, GC_EVENT_MESSAGE }; + gce.pszID.w = pUser->wszUsername; gce.dwFlags = GCEF_ADDTOLOG; - gce.ptszUID = wszUserId; - gce.ptszText = wszText; + gce.pszUID.w = wszUserId; + gce.pszText.w = wszText; gce.time = dwTimeStamp; gce.bIsMe = authorid == m_ownId; Chat_Event(&gce); -- cgit v1.2.3