From ce6a7e1ba4d4b79909cb16fa67021a9ed3a31d5d Mon Sep 17 00:00:00 2001 From: Eragon Date: Mon, 23 Jan 2023 16:18:08 +0100 Subject: [PATCH] IRC->Shoutbox: Add support for ACTION (aka /me) --- bridge.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bridge.py b/bridge.py index 7b30818..51fb03b 100755 --- a/bridge.py +++ b/bridge.py @@ -22,6 +22,8 @@ shoutbox = Shoutbox(cookies) @irc.on(lambda m: m.to[1:] in channels and not m.author.endswith("[s]")) def handle_irc(m): + if (m.text.startswith("\x01ACTION ")): + m.text = m.text.replace("ACTION ", "[i]") shoutbox.post(m.author, m.text, m.to[1:], USERS)