From 24eb9571fbf2db08cee06de46708ed4f2c1e4e4c Mon Sep 17 00:00:00 2001 From: Lephenixnoir Date: Sat, 29 Jul 2023 23:14:45 +0200 Subject: [PATCH] Include message tags in custom IRC message parsing --- irc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/irc.py b/irc.py index c7afacd..03032da 100644 --- a/irc.py +++ b/irc.py @@ -174,7 +174,7 @@ class IRC(object): class IRCMessage(object): - r = re.compile("^:(?P[\w.~|\[\]]+)(?:!(?P\S+))? PRIVMSG (?P\S+) :(?P.+)") + r = re.compile("^(?:@[^ ]+ *)?:(?P[\w.~|\[\]]+)(?:!(?P\S+))? PRIVMSG (?P\S+) :(?P.+)") def __init__(self, raw): match = re.search(IRCMessage.r, raw)