[Protocol] Add app id checking to valve protocol in gather settings (#87)

This commit is contained in:
CosminPerRam 2023-08-15 22:00:20 +03:00 committed by GitHub
parent 071fc367df
commit b35e52f795
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View file

@ -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)));
}
}

View file

@ -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,
}
}
}