1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-07 18:23:13 +02:00

irc: add argument "server_message" in function irc_nick_color_for_msg

This commit is contained in:
Sébastien Helleu
2014-11-01 11:40:21 +01:00
parent 0d1bfb4dc5
commit b1caceb6e5
7 changed files with 264 additions and 231 deletions
+8 -18
View File
@@ -1004,10 +1004,15 @@ irc_nick_as_prefix (struct t_irc_server *server, struct t_irc_nick *nick,
*/
const char *
irc_nick_color_for_message (struct t_irc_server *server,
struct t_irc_nick *nick,
const char *nickname)
irc_nick_color_for_msg (struct t_irc_server *server, int server_message,
struct t_irc_nick *nick, const char *nickname)
{
if (server_message
&& !weechat_config_boolean (irc_config_look_color_nicks_in_server_messages))
{
return IRC_COLOR_CHAT_NICK;
}
if (nick)
return nick->color;
@@ -1024,21 +1029,6 @@ irc_nick_color_for_message (struct t_irc_server *server,
return IRC_COLOR_CHAT_NICK;
}
/*
* Returns WeeChat color code for a nick (used in a server message).
*/
const char *
irc_nick_color_for_server_message (struct t_irc_server *server,
struct t_irc_nick *nick,
const char *nickname)
{
if (!weechat_config_boolean(irc_config_look_color_nicks_in_server_messages))
return IRC_COLOR_CHAT_NICK;
return irc_nick_color_for_message (server, nick, nickname);
}
/*
* Returns string with color of nick for private.
*/