summaryrefslogtreecommitdiff
path: root/server/src/commands.rs
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2024-09-18 15:42:19 +0200
committermetamuffin <metamuffin@disroot.org>2024-09-18 15:42:19 +0200
commitfb6ca2a4b9d78dd80dbdf37b2926d9ede4108e8b (patch)
tree76b1a77dcd3ae29595caaa6423a18b5ce29e32db /server/src/commands.rs
parente5fdbaadbf01f14290e70c49482e1dce3c9816d8 (diff)
downloadhurrycurry-fb6ca2a4b9d78dd80dbdf37b2926d9ede4108e8b.tar
hurrycurry-fb6ca2a4b9d78dd80dbdf37b2926d9ede4108e8b.tar.bz2
hurrycurry-fb6ca2a4b9d78dd80dbdf37b2926d9ede4108e8b.tar.zst
translate server messages
Diffstat (limited to 'server/src/commands.rs')
-rw-r--r--server/src/commands.rs10
1 files changed, 7 insertions, 3 deletions
diff --git a/server/src/commands.rs b/server/src/commands.rs
index b06d9261..8e6f32c7 100644
--- a/server/src/commands.rs
+++ b/server/src/commands.rs
@@ -18,6 +18,7 @@
use crate::{
entity::{bot::BotDriver, tutorial::Tutorial},
server::Server,
+ trm,
};
use anyhow::{anyhow, bail, Result};
use clap::{Parser, ValueEnum};
@@ -131,14 +132,17 @@ impl Server {
Command::End => {
self.tx
.send(PacketC::ServerMessage {
- text: format!(
- "Game was aborted by {}.",
- self.game
+ message: trm!(
+ "s.state.game_aborted",
+ s = self
+ .game
.players
.get(&player)
.ok_or(anyhow!("player missing"))?
.name
+ .clone()
),
+ error: false,
})
.ok();
self.load(self.index.generate("lobby").await?, None);