irc: add separate options for kick/kill message coloring (closes #683)
Add new options irc.color.message_kick and irc.color.reason_kick to be used for coloring KICK and KILL messages.v2.8-utf8proc
parent
c5ffc3917f
commit
e437613acb
|
@ -22,6 +22,7 @@ New features::
|
|||
|
||||
* core: add length of string (number of chars and on screen) in evaluation of expressions with "length:xxx" and "lengthscr:xxx"
|
||||
* core: add calculation of expression in evaluation of expressions with "calc:xxx" (issue #997)
|
||||
* irc: add options irc.color.message_kick and irc.color.reason_kick (issue #683, issue #684)
|
||||
* script: add options "-ol" and "-il" in command /script to send translated string with list of scripts loaded, display "No scripts loaded" if no scripts are loaded
|
||||
|
||||
Bug fixes::
|
||||
|
|
|
@ -85,7 +85,9 @@
|
|||
#define IRC_COLOR_STATUS_NAME_SSL weechat_color("status_name_ssl")
|
||||
#define IRC_COLOR_MESSAGE_JOIN weechat_color(weechat_config_string(irc_config_color_message_join))
|
||||
#define IRC_COLOR_MESSAGE_CHGHOST weechat_color(weechat_config_string(irc_config_color_message_chghost))
|
||||
#define IRC_COLOR_MESSAGE_KICK weechat_color(weechat_config_string(irc_config_color_message_kick))
|
||||
#define IRC_COLOR_MESSAGE_QUIT weechat_color(weechat_config_string(irc_config_color_message_quit))
|
||||
#define IRC_COLOR_REASON_KICK weechat_color(weechat_config_string(irc_config_color_reason_kick))
|
||||
#define IRC_COLOR_REASON_QUIT weechat_color(weechat_config_string(irc_config_color_reason_quit))
|
||||
#define IRC_COLOR_TOPIC_CURRENT weechat_color(weechat_config_string(irc_config_color_topic_current))
|
||||
#define IRC_COLOR_TOPIC_OLD weechat_color(weechat_config_string(irc_config_color_topic_old))
|
||||
|
|
|
@ -116,10 +116,12 @@ struct t_config_option *irc_config_color_item_lag_finished;
|
|||
struct t_config_option *irc_config_color_item_nick_modes;
|
||||
struct t_config_option *irc_config_color_message_join;
|
||||
struct t_config_option *irc_config_color_message_chghost;
|
||||
struct t_config_option *irc_config_color_message_kick;
|
||||
struct t_config_option *irc_config_color_message_quit;
|
||||
struct t_config_option *irc_config_color_mirc_remap;
|
||||
struct t_config_option *irc_config_color_nick_prefixes;
|
||||
struct t_config_option *irc_config_color_notice;
|
||||
struct t_config_option *irc_config_color_reason_kick;
|
||||
struct t_config_option *irc_config_color_reason_quit;
|
||||
struct t_config_option *irc_config_color_topic_current;
|
||||
struct t_config_option *irc_config_color_topic_new;
|
||||
|
@ -3186,6 +3188,12 @@ irc_config_init ()
|
|||
N_("color for text in chghost messages"),
|
||||
NULL, -1, 0, "brown", NULL, 0,
|
||||
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
irc_config_color_message_kick = weechat_config_new_option (
|
||||
irc_config_file, ptr_section,
|
||||
"message_kick", "color",
|
||||
N_("color for text in kick/kill messages"),
|
||||
NULL, -1, 0, "red", NULL, 0,
|
||||
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
irc_config_color_message_quit = weechat_config_new_option (
|
||||
irc_config_file, ptr_section,
|
||||
"message_quit", "color",
|
||||
|
@ -3228,6 +3236,12 @@ irc_config_init ()
|
|||
N_("color for text \"Notice\" in notices"),
|
||||
NULL, -1, 0, "green", NULL, 0,
|
||||
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
irc_config_color_reason_kick = weechat_config_new_option (
|
||||
irc_config_file, ptr_section,
|
||||
"reason_kick", "color",
|
||||
N_("color for reason in kick/kill messages"),
|
||||
NULL, -1, 0, "default", NULL, 0,
|
||||
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
irc_config_color_reason_quit = weechat_config_new_option (
|
||||
irc_config_file, ptr_section,
|
||||
"reason_quit", "color",
|
||||
|
|
|
@ -154,10 +154,12 @@ extern struct t_config_option *irc_config_color_item_lag_finished;
|
|||
extern struct t_config_option *irc_config_color_item_nick_modes;
|
||||
extern struct t_config_option *irc_config_color_message_join;
|
||||
extern struct t_config_option *irc_config_color_message_chghost;
|
||||
extern struct t_config_option *irc_config_color_message_kick;
|
||||
extern struct t_config_option *irc_config_color_message_quit;
|
||||
extern struct t_config_option *irc_config_color_mirc_remap;
|
||||
extern struct t_config_option *irc_config_color_nick_prefixes;
|
||||
extern struct t_config_option *irc_config_color_notice;
|
||||
extern struct t_config_option *irc_config_color_reason_kick;
|
||||
extern struct t_config_option *irc_config_color_reason_quit;
|
||||
extern struct t_config_option *irc_config_color_topic_current;
|
||||
extern struct t_config_option *irc_config_color_topic_new;
|
||||
|
|
|
@ -1295,12 +1295,12 @@ IRC_PROTOCOL_CALLBACK(kick)
|
|||
weechat_prefix ("quit"),
|
||||
irc_nick_color_for_msg (server, 1, ptr_nick, nick),
|
||||
nick,
|
||||
IRC_COLOR_MESSAGE_QUIT,
|
||||
IRC_COLOR_MESSAGE_KICK,
|
||||
irc_nick_color_for_msg (server, 1, ptr_nick_kicked, argv[3]),
|
||||
argv[3],
|
||||
IRC_COLOR_MESSAGE_QUIT,
|
||||
IRC_COLOR_MESSAGE_KICK,
|
||||
IRC_COLOR_CHAT_DELIMITERS,
|
||||
IRC_COLOR_RESET,
|
||||
IRC_COLOR_REASON_KICK,
|
||||
pos_comment,
|
||||
IRC_COLOR_CHAT_DELIMITERS);
|
||||
}
|
||||
|
@ -1315,10 +1315,10 @@ IRC_PROTOCOL_CALLBACK(kick)
|
|||
weechat_prefix ("quit"),
|
||||
irc_nick_color_for_msg (server, 1, ptr_nick, nick),
|
||||
nick,
|
||||
IRC_COLOR_MESSAGE_QUIT,
|
||||
IRC_COLOR_MESSAGE_KICK,
|
||||
irc_nick_color_for_msg (server, 1, ptr_nick_kicked, argv[3]),
|
||||
argv[3],
|
||||
IRC_COLOR_MESSAGE_QUIT);
|
||||
IRC_COLOR_MESSAGE_KICK);
|
||||
}
|
||||
|
||||
if (irc_server_strcasecmp (server, argv[3], server->nick) == 0)
|
||||
|
@ -1414,12 +1414,12 @@ IRC_PROTOCOL_CALLBACK(kill)
|
|||
irc_protocol_tags (command, NULL, NULL, address),
|
||||
_("%s%sYou were killed by %s%s%s %s(%s%s%s)"),
|
||||
weechat_prefix ("quit"),
|
||||
IRC_COLOR_MESSAGE_QUIT,
|
||||
IRC_COLOR_MESSAGE_KICK,
|
||||
irc_nick_color_for_msg (server, 1, ptr_nick, nick),
|
||||
nick,
|
||||
IRC_COLOR_MESSAGE_QUIT,
|
||||
IRC_COLOR_MESSAGE_KICK,
|
||||
IRC_COLOR_CHAT_DELIMITERS,
|
||||
IRC_COLOR_RESET,
|
||||
IRC_COLOR_REASON_KICK,
|
||||
pos_comment,
|
||||
IRC_COLOR_CHAT_DELIMITERS);
|
||||
}
|
||||
|
@ -1432,10 +1432,10 @@ IRC_PROTOCOL_CALLBACK(kill)
|
|||
irc_protocol_tags (command, NULL, NULL, address),
|
||||
_("%s%sYou were killed by %s%s%s"),
|
||||
weechat_prefix ("quit"),
|
||||
IRC_COLOR_MESSAGE_QUIT,
|
||||
IRC_COLOR_MESSAGE_KICK,
|
||||
irc_nick_color_for_msg (server, 1, ptr_nick, nick),
|
||||
nick,
|
||||
IRC_COLOR_MESSAGE_QUIT);
|
||||
IRC_COLOR_MESSAGE_KICK);
|
||||
}
|
||||
|
||||
if (irc_server_strcasecmp (server, argv[2], server->nick) == 0)
|
||||
|
|
Loading…
Reference in New Issue