mirror of
https://github.com/tribufu/rust-gamedig
synced 2026-06-01 09:42:41 +00:00
[Protocol] Add app id checking to valve protocol in gather settings (#87)
This commit is contained in:
parent
071fc367df
commit
b35e52f795
2 changed files with 3 additions and 1 deletions
|
|
@ -448,7 +448,7 @@ fn get_response(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if !is_specified_id {
|
if !is_specified_id && gather_settings.check_app_id {
|
||||||
return Err(BadGame.context(format!("AppId: {}", info.appid)));
|
return Err(BadGame.context(format!("AppId: {}", info.appid)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -417,6 +417,7 @@ impl Engine {
|
||||||
pub struct GatheringSettings {
|
pub struct GatheringSettings {
|
||||||
pub players: bool,
|
pub players: bool,
|
||||||
pub rules: bool,
|
pub rules: bool,
|
||||||
|
pub check_app_id: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Default for GatheringSettings {
|
impl Default for GatheringSettings {
|
||||||
|
|
@ -425,6 +426,7 @@ impl Default for GatheringSettings {
|
||||||
Self {
|
Self {
|
||||||
players: true,
|
players: true,
|
||||||
rules: true,
|
rules: true,
|
||||||
|
check_app_id: true,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue