mirror of
https://github.com/weechat/weechat.git
synced 2026-07-06 05:25:41 +02:00
Move options weechat.color.nicklist_prefix to irc plugin
Options renamed or removed: - weechat.color.nicklist_prefix1 renamed to irc.color.nick_prefix_op - weechat.color.nicklist_prefix2 renamed to irc.color.nick_prefix_halfop - weechat.color.nicklist_prefix3 renamed to irc.color.nick_prefix_voice - weechat.color.nicklist_prefix4 renamed to irc.color.nick_prefix_user - weechat.color.nicklist_prefix5 removed
This commit is contained in:
@@ -405,7 +405,7 @@ irc_bar_item_input_prompt (void *data, struct t_gui_bar_item *item,
|
||||
struct t_irc_server *server;
|
||||
struct t_irc_channel *channel;
|
||||
struct t_irc_nick *ptr_nick;
|
||||
char *buf, prefix[2], str_prefix_color[64], str_prefix[64];
|
||||
char *buf, prefix[2], str_prefix[64];
|
||||
int length, prefix_color;
|
||||
|
||||
/* make C compiler happy */
|
||||
@@ -438,11 +438,8 @@ irc_bar_item_input_prompt (void *data, struct t_gui_bar_item *item,
|
||||
&prefix[0], &prefix_color, NULL, NULL);
|
||||
if (prefix[0] != ' ')
|
||||
{
|
||||
snprintf (str_prefix_color, sizeof (str_prefix_color),
|
||||
"weechat.color.nicklist_prefix%d",
|
||||
prefix_color);
|
||||
snprintf (str_prefix, sizeof (str_prefix), "%s%s",
|
||||
weechat_color(weechat_config_string(weechat_config_get(str_prefix_color))),
|
||||
weechat_color (weechat_config_string (weechat_config_get (irc_nick_get_prefix_color_name (prefix_color)))),
|
||||
prefix);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,11 +66,10 @@
|
||||
#define IRC_COLOR_CHAT_NICK_OTHER weechat_color("chat_nick_other")
|
||||
#define IRC_COLOR_CHAT_SERVER weechat_color("chat_server")
|
||||
#define IRC_COLOR_CHAT_VALUE weechat_color("chat_value")
|
||||
#define IRC_COLOR_NICKLIST_PREFIX1 weechat_color("nicklist_prefix1")
|
||||
#define IRC_COLOR_NICKLIST_PREFIX2 weechat_color("nicklist_prefix2")
|
||||
#define IRC_COLOR_NICKLIST_PREFIX3 weechat_color("nicklist_prefix3")
|
||||
#define IRC_COLOR_NICKLIST_PREFIX4 weechat_color("nicklist_prefix4")
|
||||
#define IRC_COLOR_NICKLIST_PREFIX5 weechat_color("nicklist_prefix5")
|
||||
#define IRC_COLOR_NICK_PREFIX_OP weechat_color(weechat_config_string(irc_config_color_nick_prefix_op))
|
||||
#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_BAR_FG weechat_color("bar_fg")
|
||||
#define IRC_COLOR_BAR_BG weechat_color("bar_bg")
|
||||
#define IRC_COLOR_BAR_DELIM weechat_color("bar_delim")
|
||||
|
||||
@@ -85,6 +85,10 @@ struct t_config_option *irc_config_look_topic_strip_colors;
|
||||
|
||||
struct t_config_option *irc_config_color_message_join;
|
||||
struct t_config_option *irc_config_color_message_quit;
|
||||
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_notice;
|
||||
struct t_config_option *irc_config_color_input_nick;
|
||||
struct t_config_option *irc_config_color_item_away;
|
||||
@@ -408,6 +412,23 @@ irc_config_change_color_item_buffer_name (void *data,
|
||||
weechat_bar_item_update ("buffer_name");
|
||||
}
|
||||
|
||||
/*
|
||||
* irc_config_change_color_nick_prefix: called when the color of a nick prefix
|
||||
* is changed
|
||||
*/
|
||||
|
||||
void
|
||||
irc_config_change_color_nick_prefix (void *data,
|
||||
struct t_config_option *option)
|
||||
{
|
||||
/* make C compiler happy */
|
||||
(void) data;
|
||||
(void) option;
|
||||
|
||||
weechat_bar_item_update ("input_prompt");
|
||||
weechat_bar_item_update ("nicklist");
|
||||
}
|
||||
|
||||
/*
|
||||
* irc_config_change_network_away_check: called when away check is changed
|
||||
*/
|
||||
@@ -1647,6 +1668,30 @@ irc_config_init ()
|
||||
N_("color for text in part/quit messages"),
|
||||
NULL, -1, 0, "red", NULL, 0, NULL, NULL,
|
||||
NULL, NULL, NULL, NULL);
|
||||
irc_config_color_nick_prefix_op = weechat_config_new_option (
|
||||
irc_config_file, ptr_section,
|
||||
"nick_prefix_op", "color",
|
||||
N_("color for prefix of nick which is op/admin/owner on channel"),
|
||||
NULL, -1, 0, "lightgreen", NULL, 0, NULL, NULL,
|
||||
&irc_config_change_color_nick_prefix, NULL, NULL, NULL);
|
||||
irc_config_color_nick_prefix_halfop = weechat_config_new_option (
|
||||
irc_config_file, ptr_section,
|
||||
"nick_prefix_halfop", "color",
|
||||
N_("color for prefix of nick which is halfop on channel"),
|
||||
NULL, -1, 0, "lightmagenta", NULL, 0, NULL, NULL,
|
||||
&irc_config_change_color_nick_prefix, NULL, NULL, NULL);
|
||||
irc_config_color_nick_prefix_voice = weechat_config_new_option (
|
||||
irc_config_file, ptr_section,
|
||||
"nick_prefix_voice", "color",
|
||||
N_("color for prefix of nick which has voice on channel"),
|
||||
NULL, -1, 0, "yellow", NULL, 0, NULL, NULL,
|
||||
&irc_config_change_color_nick_prefix, NULL, NULL, NULL);
|
||||
irc_config_color_nick_prefix_user = weechat_config_new_option (
|
||||
irc_config_file, ptr_section,
|
||||
"nick_prefix_user", "color",
|
||||
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_notice = weechat_config_new_option (
|
||||
irc_config_file, ptr_section,
|
||||
"notice", "color",
|
||||
|
||||
@@ -102,6 +102,10 @@ extern struct t_config_option *irc_config_look_topic_strip_colors;
|
||||
|
||||
extern struct t_config_option *irc_config_color_message_join;
|
||||
extern struct t_config_option *irc_config_color_message_quit;
|
||||
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_notice;
|
||||
extern struct t_config_option *irc_config_color_input_nick;
|
||||
extern struct t_config_option *irc_config_color_item_away;
|
||||
|
||||
+43
-27
File diff suppressed because it is too large
Load Diff
@@ -75,6 +75,7 @@ extern void irc_nick_get_gui_infos (struct t_irc_server *server,
|
||||
char *prefix, int *prefix_color,
|
||||
struct t_gui_buffer *buffer,
|
||||
struct t_gui_nick_group **group);
|
||||
extern const char *irc_nick_get_prefix_color_name (int prefix_color);
|
||||
extern struct t_irc_nick *irc_nick_new (struct t_irc_server *server,
|
||||
struct t_irc_channel *channel,
|
||||
const char *nickname,
|
||||
|
||||
@@ -3406,35 +3406,35 @@ IRC_PROTOCOL_CALLBACK(353)
|
||||
{
|
||||
case '@': /* op */
|
||||
is_op = 1;
|
||||
color = IRC_COLOR_NICKLIST_PREFIX1;
|
||||
color = IRC_COLOR_NICK_PREFIX_OP;
|
||||
break;
|
||||
case '~': /* channel owner */
|
||||
is_chanowner = 1;
|
||||
color = IRC_COLOR_NICKLIST_PREFIX1;
|
||||
color = IRC_COLOR_NICK_PREFIX_OP;
|
||||
break;
|
||||
case '*': /* channel owner */
|
||||
is_chanowner = 1;
|
||||
color = IRC_COLOR_NICKLIST_PREFIX1;
|
||||
color = IRC_COLOR_NICK_PREFIX_OP;
|
||||
break;
|
||||
case '&': /* channel admin */
|
||||
is_chanadmin = 1;
|
||||
color = IRC_COLOR_NICKLIST_PREFIX1;
|
||||
color = IRC_COLOR_NICK_PREFIX_OP;
|
||||
break;
|
||||
case '!': /* channel admin (2) */
|
||||
is_chanadmin2 = 1;
|
||||
color = IRC_COLOR_NICKLIST_PREFIX1;
|
||||
color = IRC_COLOR_NICK_PREFIX_OP;
|
||||
break;
|
||||
case '%': /* half-op */
|
||||
is_halfop = 1;
|
||||
color = IRC_COLOR_NICKLIST_PREFIX2;
|
||||
color = IRC_COLOR_NICK_PREFIX_HALFOP;
|
||||
break;
|
||||
case '+': /* voice */
|
||||
has_voice = 1;
|
||||
color = IRC_COLOR_NICKLIST_PREFIX3;
|
||||
color = IRC_COLOR_NICK_PREFIX_VOICE;
|
||||
break;
|
||||
case '-': /* channel user */
|
||||
is_chanuser = 1;
|
||||
color = IRC_COLOR_NICKLIST_PREFIX4;
|
||||
color = IRC_COLOR_NICK_PREFIX_USER;
|
||||
break;
|
||||
default:
|
||||
color = IRC_COLOR_CHAT;
|
||||
|
||||
Reference in New Issue
Block a user