summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2011-08-21 13:55:06 +0200
committerSebastien Helleu <flashcode@flashtux.org>2011-08-21 13:55:06 +0200
commit8fd1d48723b5aa9e0e7cd1f5862be5be61b02783 (patch)
treefbea1bb83d35289917ad24b6f65efa0487be9213
parent67a9f942e7026bb1f8ff2534056d869076e486d5 (diff)
downloadweechat-8fd1d48723b5aa9e0e7cd1f5862be5be61b02783.zip
irc: use color "default" for any invalid color in option weechat.color.chat_nick_colors
-rw-r--r--ChangeLog4
-rw-r--r--src/plugins/irc/irc-nick.c5
2 files changed, 6 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 7b725fba9..160d39f76 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,7 @@
WeeChat ChangeLog
=================
Sébastien Helleu <flashcode@flashtux.org>
-v0.3.6-dev, 2011-08-20
+v0.3.6-dev, 2011-08-21
Version 0.3.6 (under dev!)
@@ -61,6 +61,8 @@ Version 0.3.6 (under dev!)
description for option when function is called)
* scripts: fix crash with scripts not auto-loaded having a buffer opened after
/upgrade (input/close callbacks for buffer not set properly)
+* irc: use color "default" for any invalid color in option
+ weechat.color.chat_nick_colors
* irc: send WHO command to check away nicks only if channel was not parted
* irc: fix crash when malformed IRC message 352 (WHO) is received (bug #33790)
* irc: fix crash when command "/buffer close" is used in a server command to
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");
}
/*