From 277e87c244d003bee9374d71e678049c41e61e5b Mon Sep 17 00:00:00 2001 From: metamuffin Date: Tue, 24 Sep 2024 15:21:22 +0200 Subject: change some stuff regarding default timer for games --- server/src/commands.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'server/src/commands.rs') diff --git a/server/src/commands.rs b/server/src/commands.rs index 6fd95eac..9d34c28c 100644 --- a/server/src/commands.rs +++ b/server/src/commands.rs @@ -35,8 +35,7 @@ enum Command { #[arg(default_value = "junior")] spec: String, /// Duration in seconds - #[arg(default_value = "420")] - timer: u64, + timer: Option, }, /// Shows the best entries of the scoreboard for this map. #[clap(alias = "top5")] @@ -146,7 +145,7 @@ impl Server { .ok(); } let data = self.index.generate(&spec).await?; - self.load(data, Some(Duration::from_secs(timer))); + self.load(data, timer.map(Duration::from_secs)); } Command::End => { self.tx -- cgit v1.2.3-70-g09d2