summaryrefslogtreecommitdiff
path: root/server/src/commands.rs
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2024-09-24 15:21:22 +0200
committermetamuffin <metamuffin@disroot.org>2024-09-24 15:21:22 +0200
commit277e87c244d003bee9374d71e678049c41e61e5b (patch)
tree3127d57c13ed40c007a870dba37e3d9faf4d5c99 /server/src/commands.rs
parent75b3c33ed130eaacc2e962846d951ea6472c2ed7 (diff)
downloadhurrycurry-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.rs5
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