1
0
mirror of https://git.ngram.ca/OpenJam/rc-servers synced 2026-08-23 23:08:52 +00:00

Add multiplayer dos protection config toggle

This commit is contained in:
NG (Graham)
2026-01-12 17:04:41 -05:00
parent e76c1a6f3f
commit d421cfa264
4 changed files with 11 additions and 1 deletions

View File

@@ -98,6 +98,8 @@ pub struct ServerSettings {
pub wiki_url: String,
#[serde(default = "default_game_version")]
pub min_version: u32,
#[serde(default = "default_true")]
pub dos_protection: bool,
}
#[derive(Serialize, Deserialize, Clone, Debug, Default)]
@@ -124,6 +126,7 @@ fn default_server_conf() -> ServerSettings {
support_url: default_support_url(),
wiki_url: default_wiki_url(),
min_version: default_game_version(),
dos_protection: default_true(),
}
}
@@ -154,3 +157,7 @@ fn default_wiki_url() -> String {
fn default_game_version() -> u32 {
2855
}
fn default_true() -> bool {
true
}