Skip to content

Commit

Permalink
fix: turn off termination after a complete track
Browse files Browse the repository at this point in the history
  • Loading branch information
y5c4l3 committed Oct 28, 2023
1 parent f6128a7 commit c3b89fa
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/bancho/bot/message.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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)
Expand Down Expand Up @@ -363,7 +366,7 @@ impl MessageAssembler {
self.needs_termination = false;
Some(composed)
}
_ => panic!("unexpected termination state"),
_ => panic!("unexpected termination state {:?}", self.lines),
}
} else {
None
Expand Down

0 comments on commit c3b89fa

Please sign in to comment.