From 6159a7c38517baea28644dae1264e99743dc632c Mon Sep 17 00:00:00 2001 From: cosminperram Date: Sat, 22 Oct 2022 02:39:06 +0300 Subject: [PATCH] Version bump! --- CHANGELOG.md | 10 ++++++++++ Cargo.toml | 2 +- GAMES.md | 2 +- README.md | 4 ++-- src/protocols/valve.rs | 4 ++-- 5 files changed, 16 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cfade97..cb645b8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,16 @@ Who knows what the future holds... +# 0.0.3 - 22/10/2022 +Valve protocol now properly supports multi-packet responses (compressed ones not tested). +CSGO, TF2 and TS now have independent Responses, if you want a generic one, query the protocol. +[Counter Strike: Source](https://store.steampowered.com/app/240/CounterStrike_Source/) implementation (if protocol is 7, queries with multi-packet responses will crash). +[Day of Defeat: Source](https://store.steampowered.com/app/300/Day_of_Defeat_Source/) implementation. +[Garry's Mod](https://store.steampowered.com/app/4000/Garrys_Mod/) implementation. +[Half-Life 2 Deathmatch](https://store.steampowered.com/app/320/HalfLife_2_Deathmatch/) implementation. +[Left 4 Dead](https://store.steampowered.com/app/500/Left_4_Dead/) implementation. +[Left 4 Dead 2](https://store.steampowered.com/app/550/Left_4_Dead_2/) implementation. + # 0.0.2 - 20/10/2022 Further implementation of the Valve protocol (PLAYERS and RULES queries). [Counter Strike: Global Offensive](https://store.steampowered.com/app/730/CounterStrike_Global_Offensive/) implementation. diff --git a/Cargo.toml b/Cargo.toml index 8e233de..76251b7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "gamedig" -version = "0.0.2" +version = "0.0.3" edition = "2021" authors = ["CosminPerRam [cosmin.p@live.com]", "node-GameDig [https://github.com/gamedig/node-gamedig]"] license = "MIT" diff --git a/GAMES.md b/GAMES.md index bf3adf4..63e1d14 100644 --- a/GAMES.md +++ b/GAMES.md @@ -5,7 +5,7 @@ | TF2 | Team Fortress 2 | Valve Protocol | | | TS | The Ship | Valve Protocol | | | CSGO | Counter-Strike: Global Offensive | Valve Protocol | The server wouldn't respond the to Rules query since the 21 Feb 2014 update. | -| CSS | Counter-Strike: Source | Valve Protocol | If protocol is 7, the Rules query crashes. | +| CSS | Counter-Strike: Source | Valve Protocol | If protocol is 7, queries with multi-packet responses will crash. | | DODS | Day of Defeat: Source | Valve Protocol | | | L4D | Left 4 Dead | Valve Protocol | | | L4D2 | Left 4 Dead 2 | Valve Protocol | | diff --git a/README.md b/README.md index b648567..a7aa841 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ MSRV is `1.58.1` and the code is cross-platform. To see the supported (or the planned to support) games/services/protocols, see [GAMES](GAMES.md), [SERVICES](SERVICES.md) and [PROTOCOLS](PROTOCOLS.md) respectively. ## Usage -Just pick a game/service, provide the ip and the port (can be optional) then query on it. +Just pick a game/service/protocol, provide the ip and the port (can be optional) then query on it. ```rust use gamedig::games::tf2; @@ -26,4 +26,4 @@ The documentation is available at [docs.rs](https://docs.rs/gamedig/latest/gamed Curious about the history and what changed between versions? you can see just that in the [CHANGELOG](CHANGELOG.md) file. ## Contributing -If you want see your favorite game/service being supported here, open an issue and I'll prioritize it! (or do a pull request if you want to implement it yourself) +If you want see your favorite game/service being supported here, open an issue, and I'll prioritize it! (or do a pull request if you want to implement it yourself) diff --git a/src/protocols/valve.rs b/src/protocols/valve.rs index 11c42da..0e4f7c4 100644 --- a/src/protocols/valve.rs +++ b/src/protocols/valve.rs @@ -128,7 +128,7 @@ pub enum Request { pub enum App { /// Counter-Strike: Source CSS = 240, - /// Day of Defeat: Sourcec + /// Day of Defeat: Source DODS = 300, /// Half-Life 2 Deathmatch HL2DM = 320, @@ -254,7 +254,7 @@ impl SplitPacket { let id = buffer::get_u32_le(&buf, &mut pos)?; let total = buffer::get_u8(&buf, &mut pos)?; let number = buffer::get_u8(&buf, &mut pos)?; - let size = buffer::get_u16_le(&buf, &mut pos)?; + let size = buffer::get_u16_le(&buf, &mut pos)?; //if game is CSS and if protocol is 7, queries with multi-packet responses will crash let compressed = ((id >> 31) & 1) == 1; let (decompressed_size, uncompressed_crc32) = match compressed { false => (None, None),