diff --git a/src/main.rs b/src/main.rs index af34c62..1ed4e23 100644 --- a/src/main.rs +++ b/src/main.rs @@ -234,7 +234,10 @@ async fn main() -> std::io::Result<()> { .add_system("h", show_help) .await .add_system("s", show_status) - .await; + .await + .add_system("stop", stop) + .await + ; irc.run().await?; Ok(()) @@ -532,6 +535,7 @@ fn show_help() -> impl IntoResponse { ",f ... vs ... | team battle", ",f ... | free for all", ",s | show the current fight status", + ",stop | stop the current fight", ",hof | hall of fame", ], ) @@ -544,3 +548,9 @@ fn show_status(fight: Res) -> impl IntoResponse { format!("{} fighters remaining", fight.fighters.len()) } + +fn stop(mut fight: ResMut) { + fight.fighters = vec![]; + fight.channel = "".to_owned(); + fight.status = FightStatus::Idle; +}