From 3184ddc3cddb0d586c809aeb61ea549ba1318aa8 Mon Sep 17 00:00:00 2001 From: Eragon Date: Wed, 9 Mar 2022 14:15:20 +0100 Subject: [PATCH] Ignore all messages ending with [IRC] --- bridge.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bridge.py b/bridge.py index 499596d..5727619 100644 --- a/bridge.py +++ b/bridge.py @@ -25,7 +25,7 @@ def handle_irc(m): shoutbox.post(m.author, m.text, m.to[1:], users) -@shoutbox.on(lambda m: m.channel in channels and m.author != "IRC") +@shoutbox.on(lambda m: m.channel in channels and m.author != "IRC" and not m.text.endswith("[IRC]")) def handle_shoutbox(m): irc.send(f"#{m.channel}", f"{m.author}: {m.text}")