summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2019-12-08 14:35:53 -0500
committerJune McEnroe <june@causal.agency>2019-12-08 14:35:53 -0500
commitc1031563ae270b154bbacb7bbe4b4d911acb69a5 (patch)
tree9e338b3c14473bdb8ab6f8a5445effc72e54fe6a
parentAdd irc format (diff)
downloadlitterbox-c1031563ae270b154bbacb7bbe4b4d911acb69a5.tar.gz
litterbox-c1031563ae270b154bbacb7bbe4b4d911acb69a5.zip
Match missing final parameters in irc format
-rw-r--r--unscoop.c16
1 files changed, 9 insertions, 7 deletions
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
logheader'>2018-11-13Add gzungetc.3June McEnroe 2018-11-13Add gzgetc.3June McEnroe 2018-11-13Add gzputc.3June McEnroe 2018-11-13Add gzgets.3June McEnroe 2018-11-13Add gzputs.3June McEnroe 2018-11-13Add gzprintf.3June McEnroe 2018-11-13Add gzfwrite.3June McEnroe 2018-11-13Add gzwrite.3June McEnroe 2018-11-12Add gzfread.3June McEnroe 2018-11-12Add gzread.3June McEnroe 2018-11-12Add gzsetparams.3June McEnroe 2018-11-12Add gzbuffer.3June McEnroe 2018-11-12Add gzdopen to gzopen.3June McEnroe 2018-11-12Add gzopen.3June McEnroe 2018-11-12Add inflateBackEnd.3June McEnroe 2018-11-12Add inflateBack.3June McEnroe 2018-11-12Add inflateBackInit.3June McEnroe 2018-11-11Add inflateGetHeader.3June McEnroe 2018-11-11Add inflateMark.3June McEnroe 2018-11-11Add inflatePrime.3June McEnroe 2018-11-11Add inflateReset.3June McEnroe 2018-11-11Add inflateCopy.3June McEnroe 2018-11-11Add inflateSync.3June McEnroe 2018-11-11Add inflateGetDictionary.3June McEnroe 2018-11-11Add inflateSetDictionary.3June McEnroe 2018-11-11Add inflateInit2.3June McEnroe