1
0
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:
Sébastien Helleu
2023-06-03 21:15:58 +02:00
parent 482fe6604c
commit 682fc40708
18 changed files with 99 additions and 24 deletions
+7
View File
@@ -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",
+1
View File
@@ -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;
+9 -3
View File
@@ -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,