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.rs13
1 files changed, 9 insertions, 4 deletions
diff --git a/server/src/commands.rs b/server/src/commands.rs
index 64fa50f6..b6b00c22 100644
--- a/server/src/commands.rs
+++ b/server/src/commands.rs
@@ -39,8 +39,8 @@ enum Command {
timer: Option<u64>,
},
/// Shows the best entries of the scoreboard for this map.
- #[clap(alias = "top5")]
- Top {
+ #[clap(alias = "top", alias = "top5")]
+ Scoreboard {
/// Name of the map, default: current
map: Option<String>,
/// Send text instead of document
@@ -247,7 +247,7 @@ impl Server {
algo,
)));
}
- Command::Top { map, text } => {
+ Command::Scoreboard { map, text } => {
let mapname = map.as_ref().unwrap_or(&self.game.data.current_map);
if let Some(board) = self.scoreboard.get(mapname) {
@@ -286,7 +286,7 @@ impl Server {
es: board
.best
.iter()
- .take(5)
+ .take(10)
.enumerate()
.map(|(place, entry)| DocumentElement::Text {
s: trm!(
@@ -307,6 +307,11 @@ impl Server {
}],
})));
}
+ } else {
+ replies.push(PacketC::ServerMessage {
+ message: trm!("c.menu.scoreboard.no_finish", s = mapname.to_string()),
+ error: false,
+ });
}
}
Command::Info { map } => {