remove the bridge-speaker from the message when relevant

this allows downstream event handlers to react to e.g.:

<discord_user> !weather 12345

as if they were normal leading IRC commands
This commit is contained in:
Brian S. Stephan 2023-09-12 09:14:59 -05:00
parent 333424025b
commit ee6ae7080e
Signed by: bss
GPG Key ID: 3DE06D3180895FCB
1 changed files with 1 additions and 0 deletions

View File

@ -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: