1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-27 21:36:37 +02:00

Add new options irc.color.nick_prefix and irc.color.nick_suffix

This commit is contained in:
Sebastien Helleu
2010-10-13 08:41:03 +02:00
parent 34d14e649e
commit 26e98da4cb
18 changed files with 132 additions and 13 deletions
+2
View File
@@ -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")
+16
View File
@@ -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",
+2
View File
@@ -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;
+2 -2
View File
@@ -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) : "");