From c1031563ae270b154bbacb7bbe4b4d911acb69a5 Mon Sep 17 00:00:00 2001 From: "C. McEnroe" Date: Sun, 8 Dec 2019 14:35:53 -0500 Subject: Match missing final parameters in irc format --- unscoop.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'unscoop.c') diff --git a/unscoop.c b/unscoop.c index f2eddaf..d1d27d0 100644 --- a/unscoop.c +++ b/unscoop.c @@ -118,13 +118,15 @@ static const struct Matcher IRC[] = { Join, { NULL, "$time", "$nick", "$user", "$host" }, }, { - P2_TAGS P3_ORIGIN "PART [^ ]+ :?(.+)?", - Part, { NULL, "$time", "$nick", "$user", "$host", "$message" }, + P2_TAGS P3_ORIGIN "PART [^ ]+( :?(.+))?", + Part, { NULL, "$time", "$nick", "$user", "$host", NULL, "$message" }, }, { - P2_TAGS P3_ORIGIN "KICK [^ ]+ ([^ ]+) :?(.+)?", - Kick, - { NULL, "$time", "$nick", "$user", "$host", "$target", "$message" }, + P2_TAGS P3_ORIGIN "KICK [^ ]+ ([^ ]+)( :?(.+))?", + Kick, { + NULL, "$time", "$nick", "$user", "$host", "$target", + NULL, "$message" + }, }, { P2_TAGS P3_ORIGIN "QUIT( :?(.+))?", @@ -135,8 +137,8 @@ static const struct Matcher IRC[] = { Nick, { NULL, "$time", "$nick", "$user", "$host", "$target" }, }, { - P2_TAGS P3_ORIGIN "TOPIC [^ ]+ :?(.+)", - Topic, { NULL, "$time", "$nick", "$user", "$host", "$message" }, + P2_TAGS P3_ORIGIN "TOPIC [^ ]+( :?(.+))?", + Topic, { NULL, "$time", "$nick", "$user", "$host", NULL, "$message" }, }, }; #undef P2_TAGS -- cgit 1.4.1