diff options
author | George Hazan <ghazan@miranda.im> | 2021-12-26 20:31:39 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2021-12-26 20:31:39 +0300 |
commit | cddcd7483a7c472598af098e759e5d309024f606 (patch) | |
tree | b0a227d6e087c41958cc84d27bc323353248aae5 /protocols/Discord | |
parent | 1039b2829a264280493ba0fa979214fe024dc70c (diff) |
DWORD -> uint32_t
Diffstat (limited to 'protocols/Discord')
-rw-r--r-- | protocols/Discord/src/dispatch.cpp | 4 | ||||
-rw-r--r-- | protocols/Discord/src/proto.h | 2 | ||||
-rw-r--r-- | protocols/Discord/src/server.cpp | 4 | ||||
-rw-r--r-- | protocols/Discord/src/utils.cpp | 2 | ||||
-rw-r--r-- | protocols/Discord/src/voice.cpp | 4 |
5 files changed, 8 insertions, 8 deletions
diff --git a/protocols/Discord/src/dispatch.cpp b/protocols/Discord/src/dispatch.cpp index 45fba1fb94..c7597280ad 100644 --- a/protocols/Discord/src/dispatch.cpp +++ b/protocols/Discord/src/dispatch.cpp @@ -416,7 +416,7 @@ void CDiscordProto::OnCommandMessage(const JSONNode &pRoot, bool bIsNew) debugLogA("store a message from private user %lld, channel id %lld", pUser->id, pUser->channelId); ptrA buf(mir_utf8encodeW(wszText)); - recv.timestamp = (DWORD)StringToDate(pRoot["timestamp"].as_mstring()); + recv.timestamp = (uint32_t)StringToDate(pRoot["timestamp"].as_mstring()); recv.szMessage = buf; recv.szMsgId = szMsgId; ProtoChainRecvMsg(pUser->hContact, &recv); @@ -440,7 +440,7 @@ void CDiscordProto::OnCommandMessage(const JSONNode &pRoot, bool bIsNew) gce.dwFlags = GCEF_ADDTOLOG; gce.pszUID.w = wszUserId; gce.pszText.w = wszText; - gce.time = (DWORD)StringToDate(pRoot["timestamp"].as_mstring()); + gce.time = (uint32_t)StringToDate(pRoot["timestamp"].as_mstring()); gce.bIsMe = bOurMessage; Chat_Event(&gce); diff --git a/protocols/Discord/src/proto.h b/protocols/Discord/src/proto.h index 13c920be77..bf3929fd55 100644 --- a/protocols/Discord/src/proto.h +++ b/protocols/Discord/src/proto.h @@ -42,7 +42,7 @@ struct CDiscordRole : public MZeroedObject { SnowFlake id; COLORREF color; - DWORD permissions; + uint32_t permissions; int position; CMStringW wszName; }; diff --git a/protocols/Discord/src/server.cpp b/protocols/Discord/src/server.cpp index 91c573d4db..450889a9de 100644 --- a/protocols/Discord/src/server.cpp +++ b/protocols/Discord/src/server.cpp @@ -89,7 +89,7 @@ void CDiscordProto::OnReceiveHistory(NETLIBHTTPREQUEST *pReply, AsyncHttpRequest CMStringW wszUserId = pNode["author"]["id"].as_mstring(); SnowFlake msgid = ::getId(pNode["id"]); SnowFlake authorid = _wtoi64(wszUserId); - DWORD dwTimeStamp = StringToDate(pNode["timestamp"].as_mstring()); + uint32_t dwTimeStamp = StringToDate(pNode["timestamp"].as_mstring()); if (pUser->bIsPrivate) { DBEVENTINFO dbei = {}; @@ -110,7 +110,7 @@ void CDiscordProto::OnReceiveHistory(NETLIBHTTPREQUEST *pReply, AsyncHttpRequest ptrA szBody(mir_utf8encodeW(wszText)); dbei.timestamp = dwTimeStamp; dbei.pBlob = (uint8_t*)szBody.get(); - dbei.cbBlob = (DWORD)mir_strlen(szBody); + dbei.cbBlob = (uint32_t)mir_strlen(szBody); bool bSucceeded = false; char szMsgId[100]; diff --git a/protocols/Discord/src/utils.cpp b/protocols/Discord/src/utils.cpp index a3764f9b35..b3106be71f 100644 --- a/protocols/Discord/src/utils.cpp +++ b/protocols/Discord/src/utils.cpp @@ -336,7 +336,7 @@ void CDiscordProto::ProcessType(CDiscordUser *pUser, const JSONNode &pRoot) DB::AUTH_BLOB blob(pUser->hContact, T2Utf(pUser->wszUsername), nullptr, nullptr, szId, nullptr); PROTORECVEVENT pre = { 0 }; - pre.timestamp = (DWORD)time(0); + pre.timestamp = (uint32_t)time(0); pre.lParam = blob.size(); pre.szMessage = blob; ProtoChainRecv(pUser->hContact, PSR_AUTH, 0, (LPARAM)&pre); diff --git a/protocols/Discord/src/voice.cpp b/protocols/Discord/src/voice.cpp index 723376091e..ad2184230e 100644 --- a/protocols/Discord/src/voice.cpp +++ b/protocols/Discord/src/voice.cpp @@ -41,7 +41,7 @@ void CDiscordProto::OnCommandCallCreated(const JSONNode &pRoot) dbei.szModule = m_szModuleName; dbei.timestamp = pCall->startTime; dbei.eventType = EVENT_INCOMING_CALL; - dbei.cbBlob = DWORD(mir_strlen(szMessage) + 1); + dbei.cbBlob = uint32_t(mir_strlen(szMessage) + 1); dbei.pBlob = (uint8_t *)szMessage; dbei.flags = DBEF_UTF; db_event_add(pUser->hContact, &dbei); @@ -75,7 +75,7 @@ void CDiscordProto::OnCommandCallDeleted(const JSONNode &pRoot) dbei.szModule = m_szModuleName; dbei.timestamp = currTime; dbei.eventType = EVENT_CALL_FINISHED; - dbei.cbBlob = DWORD(szMessage.GetLength() + 1); + dbei.cbBlob = uint32_t(szMessage.GetLength() + 1); dbei.pBlob = (uint8_t *)szMessage.c_str(); dbei.flags = DBEF_UTF; db_event_add(pUser->hContact, &dbei); |