From ab3d423b1dc514e9db61c170ca14bab49e5280cb Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 26 Jan 2024 23:34:30 +0300 Subject: major atavism, PROTORECVEVENT, died with its own set of constants --- protocols/Steam/src/steam_contacts.cpp | 10 +++++----- protocols/Steam/src/steam_history.cpp | 10 +++++----- protocols/Steam/src/steam_proto.cpp | 4 ++-- protocols/Steam/src/steam_proto.h | 2 +- 4 files changed, 13 insertions(+), 13 deletions(-) (limited to 'protocols/Steam/src') diff --git a/protocols/Steam/src/steam_contacts.cpp b/protocols/Steam/src/steam_contacts.cpp index 9ed0746a48..8f0d7e3306 100644 --- a/protocols/Steam/src/steam_contacts.cpp +++ b/protocols/Steam/src/steam_contacts.cpp @@ -308,11 +308,11 @@ void CSteamProto::ContactIsAskingAuth(MCONTACT hContact) DB::AUTH_BLOB blob(hContact, nickName, firstName, lastName, steamId, reason); - PROTORECVEVENT recv = {}; - recv.timestamp = now(); - recv.szMessage = blob; - recv.lParam = blob.size(); - ProtoChainRecv(hContact, PSR_AUTH, 0, (LPARAM)&recv); + DB::EventInfo dbei; + dbei.timestamp = now(); + dbei.pBlob = blob; + dbei.cbBlob = blob.size(); + ProtoChainRecv(hContact, PSR_AUTH, 0, (LPARAM)&dbei); } MCONTACT CSteamProto::AddContact(const char *steamId, const wchar_t *nick, bool isTemporary) diff --git a/protocols/Steam/src/steam_history.cpp b/protocols/Steam/src/steam_history.cpp index 9590ceb26d..a57f59a9e3 100644 --- a/protocols/Steam/src/steam_history.cpp +++ b/protocols/Steam/src/steam_history.cpp @@ -53,14 +53,14 @@ void CSteamProto::OnGotHistoryMessages(const JSONNode &root, void *arg) if (timestamp <= storedMessageTS) continue; - PROTORECVEVENT recv = {}; - recv.timestamp = timestamp; - recv.szMessage = (char *)text.c_str(); + DB::EventInfo dbei; + dbei.timestamp = timestamp; + dbei.pBlob = (char *)text.c_str(); if (IsMe(steamId)) - recv.flags = PREF_SENT; + dbei.flags = DBEF_SENT; - RecvMsg(hContact, &recv); + RecvMsg(hContact, dbei); if (timestamp > newTS) newTS = timestamp; diff --git a/protocols/Steam/src/steam_proto.cpp b/protocols/Steam/src/steam_proto.cpp index f41698b34b..7cb7ec5ae5 100644 --- a/protocols/Steam/src/steam_proto.cpp +++ b/protocols/Steam/src/steam_proto.cpp @@ -139,11 +139,11 @@ int CSteamProto::Authorize(MEVENT hDbEvent) return 1; } -int CSteamProto::AuthRecv(MCONTACT hContact, PROTORECVEVENT *pre) +int CSteamProto::AuthRecv(MCONTACT hContact, DB::EventInfo &dbei) { // remember to not create this event again, unless authorization status changes again setByte(hContact, "AuthAsked", 1); - return Proto_AuthRecv(m_szModuleName, pre); + return Proto_AuthRecv(m_szModuleName, dbei); } int CSteamProto::AuthDeny(MEVENT hDbEvent, const wchar_t*) diff --git a/protocols/Steam/src/steam_proto.h b/protocols/Steam/src/steam_proto.h index 8cb7fdf0c0..7110861a58 100644 --- a/protocols/Steam/src/steam_proto.h +++ b/protocols/Steam/src/steam_proto.h @@ -268,7 +268,7 @@ public: MCONTACT AddToListByEvent(int flags, int iContact, MEVENT hDbEvent) override; int Authorize(MEVENT hDbEvent) override; - int AuthRecv(MCONTACT, PROTORECVEVENT*) override; + int AuthRecv(MCONTACT, DB::EventInfo &dbei) override; int AuthDeny(MEVENT hDbEvent, const wchar_t *szReason) override; int AuthRequest(MCONTACT hContact, const wchar_t *szMessage) override; -- cgit v1.2.3