mirror of
https://github.com/tribufu/rust-gamedig
synced 2026-05-06 07:17:27 +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)));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -417,6 +417,7 @@ impl Engine {
|
|||
pub struct GatheringSettings {
|
||||
pub players: bool,
|
||||
pub rules: bool,
|
||||
pub check_app_id: bool,
|
||||
}
|
||||
|
||||
impl Default for GatheringSettings {
|
||||
|
|
@ -425,6 +426,7 @@ impl Default for GatheringSettings {
|
|||
Self {
|
||||
players: true,
|
||||
rules: true,
|
||||
check_app_id: true,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue