From c3b89fae9b065c6414c1e0ba491ebbcc753f423b Mon Sep 17 00:00:00 2001 From: y5c4l3 Date: Sat, 28 Oct 2023 04:52:23 +0000 Subject: [PATCH] fix: turn off termination after a complete track --- src/bancho/bot/message.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/bancho/bot/message.rs b/src/bancho/bot/message.rs index e194859..3a1abf8 100644 --- a/src/bancho/bot/message.rs +++ b/src/bancho/bot/message.rs @@ -256,6 +256,7 @@ impl MessageAssembler { if let MessageKind::StatsAccuracy { .. } = message.kind() { let composed = Message::compose_stats(self.lines()); self.lines.clear(); + self.needs_termination = false; Some(composed) } else { None @@ -296,6 +297,7 @@ impl MessageAssembler { if present == size.as_usize() { let composed = Message::compose_mp_settings(self.lines()); self.lines.clear(); + self.needs_termination = false; Some(composed) } else { None @@ -316,6 +318,7 @@ impl MessageAssembler { self.lines.push(message.clone()); let composed = Message::compose_mp_map(self.lines()); self.lines.clear(); + self.needs_termination = false; Some(composed) } (None, MessageKind::MpListRefsPrompt) @@ -363,7 +366,7 @@ impl MessageAssembler { self.needs_termination = false; Some(composed) } - _ => panic!("unexpected termination state"), + _ => panic!("unexpected termination state {:?}", self.lines), } } else { None