html terminal
Diffstat (limited to 'src/webhook.rs')
-rw-r--r--src/webhook.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/webhook.rs b/src/webhook.rs
index c41f931..76127ad 100644
--- a/src/webhook.rs
+++ b/src/webhook.rs
@@ -151,6 +151,14 @@ fn get(line: &str) -> Option<Message> {
Message::Join { player }
});
}
+ static KICKAGE: LazyLock<Regex> = LazyLock::new(|| {
+ Regex::new(r"Kicking connection [0-9]{3}.[0-9]{3}.[0-9]{3}.[0-9]{3} \/ [^;]+; Reason: (.+)")
+ .unwrap()
+ });
+ if KICKAGE.is_match(line) {
+ return None;
+ }
+
static MAP_LOAD: LazyLock<Regex> = LazyLock::new(|| Regex::new(r"Loading map (.+)").unwrap());
if let Some(captures) = MAP_LOAD.captures(line) {
return Some(Message::Load {