diff options
author | metamuffin <metamuffin@disroot.org> | 2024-09-24 15:21:22 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2024-09-24 15:21:22 +0200 |
commit | 277e87c244d003bee9374d71e678049c41e61e5b (patch) | |
tree | 3127d57c13ed40c007a870dba37e3d9faf4d5c99 /server/src/commands.rs | |
parent | 75b3c33ed130eaacc2e962846d951ea6472c2ed7 (diff) | |
download | hurrycurry-277e87c244d003bee9374d71e678049c41e61e5b.tar hurrycurry-277e87c244d003bee9374d71e678049c41e61e5b.tar.bz2 hurrycurry-277e87c244d003bee9374d71e678049c41e61e5b.tar.zst |
change some stuff regarding default timer for games
Diffstat (limited to 'server/src/commands.rs')
-rw-r--r-- | server/src/commands.rs | 5 |
1 files changed, 2 insertions, 3 deletions
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<u64>, }, /// 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 |