summaryrefslogtreecommitdiff
path: root/src/plugins/irc
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2011-12-27 18:20:52 +0100
committerSebastien Helleu <flashcode@flashtux.org>2011-12-27 18:20:52 +0100
commit5ee0e798b141a8703c67634f6b307f869accb693 (patch)
treea8c61ecbcca1b1dba865811b995983da1079f9ef /src/plugins/irc
parenta35364524af23eff7a8d532cd2596857a10587f9 (diff)
downloadweechat-5ee0e798b141a8703c67634f6b307f869accb693.zip
irc: do not use option irc.look.nick_color_stop_chars for forced nick colors (bug #33480)
Diffstat (limited to 'src/plugins/irc')
-rw-r--r--src/plugins/irc/irc-nick.c18
1 files changed, 4 insertions, 14 deletions
diff --git a/src/plugins/irc/irc-nick.c b/src/plugins/irc/irc-nick.c
index 19c85a086..b7cfdc0dd 100644
--- a/src/plugins/irc/irc-nick.c
+++ b/src/plugins/irc/irc-nick.c
@@ -177,23 +177,18 @@ irc_nick_find_color (const char *nickname)
if (irc_config_num_nick_colors == 0)
return weechat_color ("default");
- nickname2 = irc_nick_strdup_for_color (nickname);
-
/* look if color is forced */
forced_color = weechat_hashtable_get (irc_config_hashtable_nick_color_force,
- (nickname2) ? nickname2 : nickname);
+ nickname);
if (forced_color)
{
forced_color = weechat_color (forced_color);
if (forced_color && forced_color[0])
- {
- if (nickname2)
- free (nickname2);
return forced_color;
- }
}
/* hash nickname to get color */
+ nickname2 = irc_nick_strdup_for_color (nickname);
color = irc_nick_hash_color ((nickname2) ? nickname2 : nickname);
if (nickname2)
free (nickname2);
@@ -222,19 +217,14 @@ irc_nick_find_color_name (const char *nickname)
if (irc_config_num_nick_colors == 0)
return default_color;
- nickname2 = irc_nick_strdup_for_color (nickname);
-
/* look if color is forced */
forced_color = weechat_hashtable_get (irc_config_hashtable_nick_color_force,
- (nickname2) ? nickname2 : nickname);
+ nickname);
if (forced_color)
- {
- if (nickname2)
- free (nickname2);
return forced_color;
- }
/* hash nickname to get color */
+ nickname2 = irc_nick_strdup_for_color (nickname);
color = irc_nick_hash_color ((nickname2) ? nickname2 : nickname);
if (nickname2)
free (nickname2);