From ee6ae7080efee7edc9b67a0de299d24e0c60325a Mon Sep 17 00:00:00 2001 From: "Brian S. Stephan" Date: Tue, 12 Sep 2023 09:14:59 -0500 Subject: [PATCH] remove the bridge-speaker from the message when relevant this allows downstream event handlers to react to e.g.: !weather 12345 as if they were normal leading IRC commands --- ircbot/bot.py | 1 + 1 file changed, 1 insertion(+) diff --git a/ircbot/bot.py b/ircbot/bot.py index 2c27d35..63b1a39 100644 --- a/ircbot/bot.py +++ b/ircbot/bot.py @@ -162,6 +162,7 @@ class DrReactor(irc.client.Reactor): if sender_nick == channel.discord_bridge: short_what = ' '.join(what.split(' ')[1:]) match = re.match(addressed_pattern, short_what, re.IGNORECASE) + event.arguments[0] = short_what else: match = re.match(addressed_pattern, what, re.IGNORECASE) except IrcChannel.DoesNotExist: