summaryrefslogtreecommitdiff
path: root/src/plugins/irc
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2010-10-13 08:41:03 +0200
committerSebastien Helleu <flashcode@flashtux.org>2010-10-13 08:41:03 +0200
commit26e98da4cbcbeee522d31d62c0fdbd991989518a (patch)
tree45ff7e2882d8d4b38a3680914717f75cdeeea79b /src/plugins/irc
parent34d14e649e0db226218d50cdab81bf8ede8f4e55 (diff)
downloadweechat-26e98da4cbcbeee522d31d62c0fdbd991989518a.zip
Add new options irc.color.nick_prefix and irc.color.nick_suffix
Diffstat (limited to 'src/plugins/irc')
-rw-r--r--src/plugins/irc/irc-color.h2
-rw-r--r--src/plugins/irc/irc-config.c16
-rw-r--r--src/plugins/irc/irc-config.h2
-rw-r--r--src/plugins/irc/irc-nick.c4
4 files changed, 22 insertions, 2 deletions
diff --git a/src/plugins/irc/irc-color.h b/src/plugins/irc/irc-color.h
index 0031a97e0..4b6588f57 100644
--- a/src/plugins/irc/irc-color.h
+++ b/src/plugins/irc/irc-color.h
@@ -70,6 +70,8 @@
#define IRC_COLOR_NICK_PREFIX_HALFOP weechat_color(weechat_config_string(irc_config_color_nick_prefix_halfop))
#define IRC_COLOR_NICK_PREFIX_VOICE weechat_color(weechat_config_string(irc_config_color_nick_prefix_voice))
#define IRC_COLOR_NICK_PREFIX_USER weechat_color(weechat_config_string(irc_config_color_nick_prefix_user))
+#define IRC_COLOR_NICK_PREFIX weechat_color(weechat_config_string(irc_config_color_nick_prefix))
+#define IRC_COLOR_NICK_SUFFIX weechat_color(weechat_config_string(irc_config_color_nick_suffix))
#define IRC_COLOR_BAR_FG weechat_color("bar_fg")
#define IRC_COLOR_BAR_BG weechat_color("bar_bg")
#define IRC_COLOR_BAR_DELIM weechat_color("bar_delim")
diff --git a/src/plugins/irc/irc-config.c b/src/plugins/irc/irc-config.c
index f5122d908..c7a48cc97 100644
--- a/src/plugins/irc/irc-config.c
+++ b/src/plugins/irc/irc-config.c
@@ -94,6 +94,8 @@ struct t_config_option *irc_config_color_nick_prefix_op;
struct t_config_option *irc_config_color_nick_prefix_halfop;
struct t_config_option *irc_config_color_nick_prefix_voice;
struct t_config_option *irc_config_color_nick_prefix_user;
+struct t_config_option *irc_config_color_nick_prefix;
+struct t_config_option *irc_config_color_nick_suffix;
struct t_config_option *irc_config_color_notice;
struct t_config_option *irc_config_color_input_nick;
struct t_config_option *irc_config_color_item_away;
@@ -1879,6 +1881,20 @@ irc_config_init ()
N_("color for prefix of nick which is user on channel"),
NULL, -1, 0, "blue", NULL, 0, NULL, NULL,
&irc_config_change_color_nick_prefix, NULL, NULL, NULL);
+ irc_config_color_nick_prefix = weechat_config_new_option (
+ irc_config_file, ptr_section,
+ "nick_prefix", "color",
+ N_("color for nick prefix (prefix is custom string displayed "
+ "before nick)"),
+ NULL, -1, 0, "green", NULL, 0, NULL, NULL,
+ NULL, NULL, NULL, NULL);
+ irc_config_color_nick_suffix = weechat_config_new_option (
+ irc_config_file, ptr_section,
+ "nick_suffix", "color",
+ N_("color for nick suffix (suffix is custom string displayed "
+ "after nick)"),
+ NULL, -1, 0, "green", NULL, 0, NULL, NULL,
+ NULL, NULL, NULL, NULL);
irc_config_color_notice = weechat_config_new_option (
irc_config_file, ptr_section,
"notice", "color",
diff --git a/src/plugins/irc/irc-config.h b/src/plugins/irc/irc-config.h
index 89310215c..9a85862ce 100644
--- a/src/plugins/irc/irc-config.h
+++ b/src/plugins/irc/irc-config.h
@@ -118,6 +118,8 @@ extern struct t_config_option *irc_config_color_nick_prefix_op;
extern struct t_config_option *irc_config_color_nick_prefix_halfop;
extern struct t_config_option *irc_config_color_nick_prefix_voice;
extern struct t_config_option *irc_config_color_nick_prefix_user;
+extern struct t_config_option *irc_config_color_nick_prefix;
+extern struct t_config_option *irc_config_color_nick_suffix;
extern struct t_config_option *irc_config_color_notice;
extern struct t_config_option *irc_config_color_input_nick;
extern struct t_config_option *irc_config_color_item_away;
diff --git a/src/plugins/irc/irc-nick.c b/src/plugins/irc/irc-nick.c
index 7666a4ff9..b88b986ef 100644
--- a/src/plugins/irc/irc-nick.c
+++ b/src/plugins/irc/irc-nick.c
@@ -698,7 +698,7 @@ irc_nick_as_prefix (struct t_irc_server *server, struct t_irc_nick *nick,
snprintf (result, sizeof (result), "%s%s%s%s%s%s%s%s\t",
(weechat_config_string (irc_config_look_nick_prefix)
&& weechat_config_string (irc_config_look_nick_prefix)[0]) ?
- IRC_COLOR_CHAT_DELIMITERS : "",
+ IRC_COLOR_NICK_PREFIX : "",
(weechat_config_string (irc_config_look_nick_prefix)
&& weechat_config_string (irc_config_look_nick_prefix)[0]) ?
weechat_config_string (irc_config_look_nick_prefix) : "",
@@ -708,7 +708,7 @@ irc_nick_as_prefix (struct t_irc_server *server, struct t_irc_nick *nick,
(nick) ? nick->name : nickname,
(weechat_config_string (irc_config_look_nick_suffix)
&& weechat_config_string (irc_config_look_nick_suffix)[0]) ?
- IRC_COLOR_CHAT_DELIMITERS : "",
+ IRC_COLOR_NICK_SUFFIX : "",
(weechat_config_string (irc_config_look_nick_suffix)
&& weechat_config_string (irc_config_look_nick_suffix)[0]) ?
weechat_config_string (irc_config_look_nick_suffix) : "");