summaryrefslogtreecommitdiff
path: root/server/src/commands.rs
diff options
context:
space:
mode:
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