about summary refs log tree commit diff
path: root/handle.c
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-03-31 14:30:42 -0400
committerJune McEnroe <june@causal.agency>2020-03-31 14:30:42 -0400
commit25f419465f019feedb7266cb68232d1b32a66957 (patch)
tree67dffcc716ad457967f884cb25f448de27634f64 /handle.c
parentSave and load buffer line heat (diff)
downloadcatgirl-25f419465f019feedb7266cb68232d1b32a66957.tar.gz
catgirl-25f419465f019feedb7266cb68232d1b32a66957.zip
Add /ignore message filtering patterns
Diffstat (limited to 'handle.c')
-rw-r--r--handle.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/handle.c b/handle.c
index 84a2927..a98c316 100644
--- a/handle.c
+++ b/handle.c
@@ -305,7 +305,7 @@ static void handleJoin(struct Message *msg) {
 		msg->params[2] = NULL;
 	}
 	uiFormat(
-		id, Cold, tagTime(msg),
+		id, ignoreCheck(Cold, msg), tagTime(msg),
 		"\3%02d%s\3\t%s%s%sarrives in \3%02d%s\3",
 		hash(msg->user), msg->nick,
 		(msg->params[2] ? "(" : ""),
@@ -337,7 +337,7 @@ static void handlePart(struct Message *msg) {
 	completeRemove(id, msg->nick);
 	urlScan(id, msg->nick, msg->params[1]);
 	uiFormat(
-		id, Cold, tagTime(msg),
+		id, ignoreCheck(Cold, msg), tagTime(msg),
 		"\3%02d%s\3\tleaves \3%02d%s\3%s%s",
 		hash(msg->user), msg->nick, hash(msg->params[0]), msg->params[0],
 		(msg->params[1] ? ": " : ""),
@@ -388,7 +388,7 @@ static void handleNick(struct Message *msg) {
 			set(&idNames[id], msg->params[0]);
 		}
 		uiFormat(
-			id, Cold, tagTime(msg),
+			id, ignoreCheck(Cold, msg), tagTime(msg),
 			"\3%02d%s\3\tis now known as \3%02d%s\3",
 			hash(msg->user), msg->nick, hash(msg->user), msg->params[0]
 		);
@@ -406,7 +406,7 @@ static void handleQuit(struct Message *msg) {
 	for (uint id; (id = completeID(msg->nick));) {
 		urlScan(id, msg->nick, msg->params[0]);
 		uiFormat(
-			id, Cold, tagTime(msg),
+			id, ignoreCheck(Cold, msg), tagTime(msg),
 			"\3%02d%s\3\tleaves%s%s",
 			hash(msg->user), msg->nick,
 			(msg->params[0] ? ": " : ""),
@@ -427,7 +427,7 @@ static void handleInvite(struct Message *msg) {
 	require(msg, true, 2);
 	if (!strcmp(msg->params[0], self.nick)) {
 		uiFormat(
-			Network, Hot, tagTime(msg),
+			Network, ignoreCheck(Hot, msg), tagTime(msg),
 			"\3%02d%s\3\tinvites you to \3%02d%s\3",
 			hash(msg->user), msg->nick, hash(msg->params[1]), msg->params[1]
 		);
@@ -1103,7 +1103,7 @@ static void handlePrivmsg(struct Message *msg) {
 			logFormat(id, tagTime(msg), "-%s- %s", msg->nick, msg->params[1]);
 		}
 		uiFormat(
-			id, Warm, tagTime(msg),
+			id, ignoreCheck(Warm, msg), tagTime(msg),
 			"\3%d-%s-\3%d\t%s",
 			hash(msg->user), msg->nick, LightGray, msg->params[1]
 		);
@@ -1111,7 +1111,7 @@ static void handlePrivmsg(struct Message *msg) {
 		logFormat(id, tagTime(msg), "* %s %s", msg->nick, msg->params[1]);
 		const char *mentions = colorMentions(id, msg);
 		uiFormat(
-			id, (mention || query ? Hot : Warm), tagTime(msg),
+			id, ignoreCheck((mention || query ? Hot : Warm), msg), tagTime(msg),
 			"%s\35\3%d* %s\17\35\t%s%s",
 			(mention ? "\26" : ""), hash(msg->user), msg->nick,
 			mentions, msg->params[1]
@@ -1120,7 +1120,7 @@ static void handlePrivmsg(struct Message *msg) {
 		logFormat(id, tagTime(msg), "<%s> %s", msg->nick, msg->params[1]);
 		const char *mentions = colorMentions(id, msg);
 		uiFormat(
-			id, (mention || query ? Hot : Warm), tagTime(msg),
+			id, ignoreCheck((mention || query ? Hot : Warm), msg), tagTime(msg),
 			"%s\3%d<%s>\17\t%s%s",
 			(mention ? "\26" : ""), hash(msg->user), msg->nick,
 			mentions, msg->params[1]