diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2011-08-21 13:55:06 +0200 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2011-08-21 13:55:06 +0200 |
commit | 8fd1d48723b5aa9e0e7cd1f5862be5be61b02783 (patch) | |
tree | fbea1bb83d35289917ad24b6f65efa0487be9213 /src/plugins/irc | |
parent | 67a9f942e7026bb1f8ff2534056d869076e486d5 (diff) | |
download | weechat-8fd1d48723b5aa9e0e7cd1f5862be5be61b02783.zip |
irc: use color "default" for any invalid color in option weechat.color.chat_nick_colors
Diffstat (limited to 'src/plugins/irc')
-rw-r--r-- | src/plugins/irc/irc-nick.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/irc/irc-nick.c b/src/plugins/irc/irc-nick.c index 3165ac66c..9656ff409 100644 --- a/src/plugins/irc/irc-nick.c +++ b/src/plugins/irc/irc-nick.c @@ -169,7 +169,7 @@ irc_nick_find_color (const char *nickname) { int color; char *nickname2; - const char *forced_color; + const char *forced_color, *str_color; if (!irc_config_nick_colors) irc_config_set_nick_colors (); @@ -199,7 +199,8 @@ irc_nick_find_color (const char *nickname) free (nickname2); /* return color */ - return weechat_color (irc_config_nick_colors[color]); + str_color = weechat_color (irc_config_nick_colors[color]); + return (str_color[0]) ? str_color : weechat_color("default"); } /* |