summaryrefslogtreecommitdiff
path: root/server/src
diff options
context:
space:
mode:
Diffstat (limited to 'server/src')
-rw-r--r--server/src/commands.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/server/src/commands.rs b/server/src/commands.rs
index f5792a22..dab0e540 100644
--- a/server/src/commands.rs
+++ b/server/src/commands.rs
@@ -126,6 +126,23 @@ impl Server {
) -> Result<()> {
match command {
Command::Start { spec, timer } => {
+ if !self.game.lobby {
+ self.tx
+ .send(PacketC::ServerMessage {
+ message: trm!(
+ "s.state.game_aborted",
+ s = self
+ .game
+ .players
+ .get(&player)
+ .ok_or(anyhow!("player missing"))?
+ .name
+ .clone()
+ ),
+ error: false,
+ })
+ .ok();
+ }
let data = self.index.generate(&spec).await?;
self.load(data, Some(Duration::from_secs(timer)));
}