summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--catgirl.13
-rw-r--r--ignore.c11
2 files changed, 9 insertions, 5 deletions
diff --git a/catgirl.1 b/catgirl.1
index 1c9abda..478b086 100644
--- a/catgirl.1
+++ b/catgirl.1
@@ -1,4 +1,4 @@
-.Dd June 12, 2020
+.Dd July  6, 2020
 .Dt CATGIRL 1
 .Os
 .
@@ -162,6 +162,7 @@ The format of the pattern is as follows:
 .Ar nick Ns Op Ar !user@host
 .Op Ar command
 .Op Ar channel
+.Op Ar message
 .Ed
 .
 .It Fl j Ar join , Cm join = Ar join
diff --git a/ignore.c b/ignore.c
index 29a681e..f91b089 100644
--- a/ignore.c
+++ b/ignore.c
@@ -46,10 +46,12 @@ const char *ignoreAdd(const char *pattern) {
 	}
 	char **dest = &ignore.patterns[ignore.len++];
 	if (!ex && !sp) {
-		asprintf(dest, "%s!*@* * *", pattern);
+		asprintf(dest, "%s!*@* * * *", pattern);
 	} else if (sp < 1) {
-		asprintf(dest, "%s * *", pattern);
+		asprintf(dest, "%s * * *", pattern);
 	} else if (sp < 2) {
+		asprintf(dest, "%s * *", pattern);
+	} else if (sp < 3) {
 		asprintf(dest, "%s *", pattern);
 	} else {
 		*dest = strdup(pattern);
@@ -72,8 +74,9 @@ bool ignoreRemove(const char *pattern) {
 enum Heat ignoreCheck(enum Heat heat, uint id, const struct Message *msg) {
 	char match[512];
 	snprintf(
-		match, sizeof(match), "%s!%s@%s %s %s",
-		msg->nick, msg->user, msg->host, msg->cmd, idNames[id]
+		match, sizeof(match), "%s!%s@%s %s %s %s",
+		msg->nick, msg->user, msg->host,
+		msg->cmd, idNames[id], (msg->params[1] ?: "")
 	);
 	for (size_t i = 0; i < ignore.len; ++i) {
 		if (fnmatch(ignore.patterns[i], match, FNM_CASEFOLD)) continue;
dd scoop output format optionJune McEnroe 2019-12-31Refactor scoop formatters and group colored outputJune McEnroe 2019-12-31Add strftime format string optionJune McEnroe 2019-12-31Refactor binding in scoopJune McEnroe 2019-12-31Add option to group events by contextJune McEnroe 2019-12-31Add missing includeJune McEnroe 2019-12-31Use standout mode for highlightingJune McEnroe 2019-12-31Rewrite scoop(1) argument descriptionsJune McEnroe 2019-12-31Color both nicks in a changeJune McEnroe 2019-12-31Implement nick-colored outputJune McEnroe 2019-12-31Only enable highlighting on terminal outputJune McEnroe 2019-12-31Set up pager pipeJune McEnroe 2019-12-30Normalize date inputJune McEnroe 2019-12-30Add initial rough version of scoopJune McEnroe 2019-12-30Join with USING wherever possibleJune McEnroe 2019-12-30Add -D flag to prospective scoop manualJune McEnroe 2019-12-30Order results by ID in outer query in litterboxJune McEnroe 2019-12-30Use X macro for Type enumJune McEnroe 2019-12-30Remove scoop -ABCJune McEnroe 2019-12-30Add limit option for litterbox's search query interfaceJune McEnroe