summaryrefslogtreecommitdiff
path: root/src/irc
diff options
context:
space:
mode:
Diffstat (limited to 'src/irc')
-rw-r--r--src/irc/irc-display.c21
-rw-r--r--src/irc/irc-recv.c22
2 files changed, 30 insertions, 13 deletions
diff --git a/src/irc/irc-display.c b/src/irc/irc-display.c
index 9b7a80275..1f75ea231 100644
--- a/src/irc/irc-display.c
+++ b/src/irc/irc-display.c
@@ -57,6 +57,7 @@ irc_display_prefix (t_gui_window *window, char *prefix)
/*
* irc_display_nick: display nick in chat window
+ * if color_nick < 0 then nick is highlighted
*/
void
@@ -92,13 +93,19 @@ irc_display_nick (t_gui_window *window, t_irc_nick *nick, int message_type,
}
}
}
- gui_printf_color_type (window,
- message_type,
- (color_nick) ?
- ((cfg_look_color_nicks) ?
- nick->color : COLOR_WIN_CHAT) :
- COLOR_WIN_CHAT,
- "%s", nick->nick);
+ if (color_nick < 0)
+ gui_printf_color_type (window,
+ message_type,
+ COLOR_WIN_CHAT_HIGHLIGHT,
+ "%s", nick->nick);
+ else
+ gui_printf_color_type (window,
+ message_type,
+ (color_nick) ?
+ ((cfg_look_color_nicks) ?
+ nick->color : COLOR_WIN_CHAT) :
+ COLOR_WIN_CHAT,
+ "%s", nick->nick);
if (display_around)
gui_printf_color_type (window,
diff --git a/src/irc/irc-recv.c b/src/irc/irc-recv.c
index a690f00ae..31e66b738 100644
--- a/src/irc/irc-recv.c
+++ b/src/irc/irc-recv.c
@@ -799,8 +799,12 @@ irc_cmd_recv_privmsg (t_irc_server *server, char *host, char *arguments)
ptr_nick = nick_search (ptr_channel, host);
if (ptr_nick)
{
- irc_display_nick (ptr_channel->window, ptr_nick,
- MSG_TYPE_NICK, 1, 1, 0);
+ if (strstr (pos, server->nick))
+ irc_display_nick (ptr_channel->window, ptr_nick,
+ MSG_TYPE_NICK, 1, -1, 0);
+ else
+ irc_display_nick (ptr_channel->window, ptr_nick,
+ MSG_TYPE_NICK, 1, 1, 0);
gui_printf_color_type (ptr_channel->window,
MSG_TYPE_MSG,
COLOR_WIN_CHAT, "%s\n", pos);
@@ -908,10 +912,16 @@ irc_cmd_recv_privmsg (t_irc_server *server, char *host, char *arguments)
gui_printf_color_type (ptr_channel->window,
MSG_TYPE_NICK,
COLOR_WIN_CHAT_DARK, "<");
- gui_printf_color_type (ptr_channel->window,
- MSG_TYPE_NICK,
- COLOR_WIN_NICK_PRIVATE,
- "%s", host);
+ if (strstr (pos, server->nick))
+ gui_printf_color_type (ptr_channel->window,
+ MSG_TYPE_NICK,
+ COLOR_WIN_CHAT_HIGHLIGHT,
+ "%s", host);
+ else
+ gui_printf_color_type (ptr_channel->window,
+ MSG_TYPE_NICK,
+ COLOR_WIN_NICK_PRIVATE,
+ "%s", host);
gui_printf_color_type (ptr_channel->window,
MSG_TYPE_NICK,
COLOR_WIN_CHAT_DARK, "> ");