From 25f419465f019feedb7266cb68232d1b32a66957 Mon Sep 17 00:00:00 2001 From: "C. McEnroe" Date: Tue, 31 Mar 2020 14:30:42 -0400 Subject: Add /ignore message filtering patterns --- handle.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'handle.c') 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] -- cgit 1.4.0