From 063f2aaa0c578ee54209b1ce31b0f584af583488 Mon Sep 17 00:00:00 2001 From: "C. McEnroe" Date: Sat, 16 Jan 2021 14:04:53 -0500 Subject: Add -I highlight option and /highlight --- handle.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'handle.c') diff --git a/handle.c b/handle.c index 702196b..ddf43e8 100644 --- a/handle.c +++ b/handle.c @@ -1198,8 +1198,9 @@ static void handlePrivmsg(struct Message *msg) { bool notice = (msg->cmd[0] == 'N'); bool action = isAction(msg); - bool mention = !mine && isMention(msg); - enum Heat heat = filterCheck((mention || query ? Hot : Warm), id, msg); + bool highlight = !mine && isMention(msg); + enum Heat heat = filterCheck((highlight || query ? Hot : Warm), id, msg); + if (heat > Warm && !mine && !query) highlight = true; if (!notice && !mine && heat > Ice) { completeTouch(id, msg->nick, hash(msg->user)); } @@ -1222,7 +1223,7 @@ static void handlePrivmsg(struct Message *msg) { uiFormat( id, heat, tagTime(msg), "%s\35\3%d* %s\17\35\t%s%s", - (mention ? "\26" : ""), hash(msg->user), msg->nick, + (highlight ? "\26" : ""), hash(msg->user), msg->nick, buf, msg->params[1] ); } else { @@ -1231,7 +1232,7 @@ static void handlePrivmsg(struct Message *msg) { uiFormat( id, heat, tagTime(msg), "%s\3%d<%s>\17\t%s%s", - (mention ? "\26" : ""), hash(msg->user), msg->nick, + (highlight ? "\26" : ""), hash(msg->user), msg->nick, buf, msg->params[1] ); } -- cgit 1.4.0