diff options
author | C. McEnroe | 2021-01-16 14:04:53 -0500 |
---|---|---|
committer | C. McEnroe | 2021-01-16 14:15:00 -0500 |
commit | 063f2aaa0c578ee54209b1ce31b0f584af583488 (patch) | |
tree | fdfa23847d747b08f8aa0b52b32462f43e9adab9 /handle.c | |
parent | 5a490945ea221cc94b05e2ed6e872a2ecbefe175 (diff) |
Add -I highlight option and /highlight
Diffstat (limited to 'handle.c')
-rw-r--r-- | handle.c | 9 |
1 files changed, 5 insertions, 4 deletions
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] ); } |