hirc

IRC client
Log | Files | Refs

commit 3ee16fa6bd5cb8760067b6f80c0c0d8cca636f5d
parent c0f783f27cd589499a4bf3489e93ee0ebb3ba2fd
Author: hhvn <dev@hhvn.uk>
Date:   Sun, 27 Mar 2022 21:20:24 +0100

Fix highlights

Diffstat:
Msrc/handle.c | 8++++++--
1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/handle.c b/src/handle.c @@ -257,7 +257,7 @@ handle_MODE) { HANDLER( handle_PRIVMSG) { - int act_direct = Activity_hilight, act_regular = Activity_message; + int act_direct = Activity_hilight, act_regular = Activity_message, act; struct Channel *chan; struct Channel *priv; struct Nick *nick; @@ -293,7 +293,11 @@ handle_PRIVMSG) { if ((chan = chan_get(&server->channels, target, -1)) == NULL) chan = chan_add(server, &server->channels, target, 0); - hist_addp(chan->history, msg, nick_isself(nick) ? act_direct : act_regular, HIST_DFL); + if (strstr(*(msg->params+2), server->self->nick)) + act = act_direct; + else + act = act_regular; + hist_addp(chan->history, msg, act, HIST_DFL); } }