diff options
| author | George Hazan <george.hazan@gmail.com> | 2024-12-18 12:43:28 +0300 |
|---|---|---|
| committer | George Hazan <george.hazan@gmail.com> | 2024-12-18 12:43:33 +0300 |
| commit | 6899d60bbb0068d0d7a7886fe263d50a73216b6c (patch) | |
| tree | 61158b637688934e9b71e15f244ba977cdc55c01 /protocols/Steam/src/steam_utils.h | |
| parent | 59f927ee88735b97514c3224ce5929a99dabfa8b (diff) | |
all HTTP friend requests rewritten using Steam API
Diffstat (limited to 'protocols/Steam/src/steam_utils.h')
| -rw-r--r-- | protocols/Steam/src/steam_utils.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/protocols/Steam/src/steam_utils.h b/protocols/Steam/src/steam_utils.h index 40cdd07088..aaae1c1fb5 100644 --- a/protocols/Steam/src/steam_utils.h +++ b/protocols/Steam/src/steam_utils.h @@ -12,7 +12,19 @@ MBinBuffer createMachineID(const char *accName); #define now() time(0) -int64_t getRandomInt(); +uint64_t getRandomInt(); CMStringA protobuf_c_text_to_string(const ProtobufCMessage &msg); +inline const char *AccountIdToSteamId(long long accountId) +{ + static char steamId[20]; + mir_snprintf(steamId, "%llu", accountId + 76561197960265728ll); + return steamId; +} + +inline uint64_t SteamIdToAccountId(uint64_t steamId) +{ + return steamId & 0xFFFFFFFFll; +} + #endif //_STEAM_UTILS_H_ |
