diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2012-04-03 21:24:24 +0200 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2012-04-03 21:24:24 +0200 |
commit | 93a77c39ba174344e4174580d6b61d42ef848d30 (patch) | |
tree | bc2e13452660c8b2d8d8ee20afdf925b74f0ee64 /src/plugins/irc/irc-input.c | |
parent | 5459e6595a5aaa36bb1e239d08407cbe9af2478c (diff) | |
download | weechat-93a77c39ba174344e4174580d6b61d42ef848d30.zip |
irc: use tag "prefix_nick_ccc" (where "ccc" is color of nick) in messages displayed
This new tag is used by WeeChat to hide/replace same prefix (option weechat.look.prefix_same_nick).
Diffstat (limited to 'src/plugins/irc/irc-input.c')
-rw-r--r-- | src/plugins/irc/irc-input.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/plugins/irc/irc-input.c b/src/plugins/irc/irc-input.c index c8e74c916..1c745d756 100644 --- a/src/plugins/irc/irc-input.c +++ b/src/plugins/irc/irc-input.c @@ -45,7 +45,7 @@ void irc_input_user_message_display (struct t_gui_buffer *buffer, const char *text) { struct t_irc_nick *ptr_nick; - char *text_decoded; + char *text_decoded, str_tags[256], *str_color; text_decoded = irc_color_decode (text, weechat_config_boolean (irc_config_network_colors_send)); @@ -61,9 +61,15 @@ irc_input_user_message_display (struct t_gui_buffer *buffer, const char *text) ptr_server->nick); } + str_color = irc_color_for_tags (weechat_config_color (weechat_config_get ("weechat.color.chat_nick_self"))); + snprintf (str_tags, sizeof (str_tags), + "notify_none,no_highlight,prefix_nick_%s", + (str_color) ? str_color : "default"); + if (str_color) + free (str_color); weechat_printf_tags (buffer, irc_protocol_tags ("privmsg", - "notify_none,no_highlight", + str_tags, (ptr_nick) ? ptr_nick->name : ptr_server->nick), "%s%s", irc_nick_as_prefix (ptr_server, |