mirror of
https://github.com/weechat/weechat.git
synced 2026-06-26 21:06:38 +02:00
irc: add option irc.look.display_host_notice
This commit is contained in:
@@ -74,6 +74,7 @@ struct t_config_option *irc_config_look_display_ctcp_unknown = NULL;
|
||||
struct t_config_option *irc_config_look_display_extended_join = NULL;
|
||||
struct t_config_option *irc_config_look_display_host_join = NULL;
|
||||
struct t_config_option *irc_config_look_display_host_join_local = NULL;
|
||||
struct t_config_option *irc_config_look_display_host_notice = NULL;
|
||||
struct t_config_option *irc_config_look_display_host_quit = NULL;
|
||||
struct t_config_option *irc_config_look_display_join_message = NULL;
|
||||
struct t_config_option *irc_config_look_display_old_topic = NULL;
|
||||
@@ -3012,6 +3013,12 @@ irc_config_init ()
|
||||
N_("display host in join messages from local client"),
|
||||
NULL, 0, 0, "on", NULL, 0,
|
||||
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
irc_config_look_display_host_notice = weechat_config_new_option (
|
||||
irc_config_file, irc_config_section_look,
|
||||
"display_host_notice", "boolean",
|
||||
N_("display host in notice messages"),
|
||||
NULL, 0, 0, "on", NULL, 0,
|
||||
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
irc_config_look_display_host_quit = weechat_config_new_option (
|
||||
irc_config_file, irc_config_section_look,
|
||||
"display_host_quit", "boolean",
|
||||
|
||||
@@ -110,6 +110,7 @@ extern struct t_config_option *irc_config_look_display_ctcp_unknown;
|
||||
extern struct t_config_option *irc_config_look_display_extended_join;
|
||||
extern struct t_config_option *irc_config_look_display_host_join;
|
||||
extern struct t_config_option *irc_config_look_display_host_join_local;
|
||||
extern struct t_config_option *irc_config_look_display_host_notice;
|
||||
extern struct t_config_option *irc_config_look_display_host_quit;
|
||||
extern struct t_config_option *irc_config_look_display_join_message;
|
||||
extern struct t_config_option *irc_config_look_display_old_topic;
|
||||
|
||||
@@ -2451,7 +2451,7 @@ IRC_PROTOCOL_CALLBACK(notice)
|
||||
const char *pos_target, *pos_args, *nick_address;
|
||||
struct t_irc_channel *ptr_channel;
|
||||
struct t_irc_nick *ptr_nick;
|
||||
int notify_private, is_channel, is_channel_orig, nick_is_me;
|
||||
int notify_private, is_channel, is_channel_orig, nick_is_me, display_host;
|
||||
struct t_gui_buffer *ptr_buffer;
|
||||
|
||||
IRC_PROTOCOL_MIN_PARAMS(2);
|
||||
@@ -2686,8 +2686,14 @@ IRC_PROTOCOL_CALLBACK(notice)
|
||||
}
|
||||
else
|
||||
{
|
||||
nick_address = irc_protocol_nick_address (server, 0, NULL,
|
||||
nick, address);
|
||||
display_host = weechat_config_boolean (
|
||||
irc_config_look_display_host_notice);
|
||||
nick_address = irc_protocol_nick_address (
|
||||
server,
|
||||
0,
|
||||
NULL,
|
||||
nick,
|
||||
(display_host) ? address : NULL);
|
||||
weechat_printf_date_tags (
|
||||
ptr_buffer,
|
||||
date,
|
||||
|
||||
Reference in New Issue
Block a user