summaryrefslogtreecommitdiff
path: root/src/plugins/irc/irc-protocol.c
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2023-06-03 21:15:58 +0200
committerSébastien Helleu <flashcode@flashtux.org>2023-06-03 21:15:58 +0200
commit682fc40708ca5ff0b86ff2f4d4652c477fdb22c5 (patch)
tree60d8dd8b39140cce9e67c859d63494bedabde1fd /src/plugins/irc/irc-protocol.c
parent482fe6604c2eff00f17e97218bdb17e683473ea5 (diff)
downloadweechat-682fc40708ca5ff0b86ff2f4d4652c477fdb22c5.zip
irc: add option irc.look.display_host_notice
Diffstat (limited to 'src/plugins/irc/irc-protocol.c')
-rw-r--r--src/plugins/irc/irc-protocol.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/plugins/irc/irc-protocol.c b/src/plugins/irc/irc-protocol.c
index b818f176a..ac8487bd1 100644
--- a/src/plugins/irc/irc-protocol.c
+++ b/src/plugins/irc/irc-protocol.c
@@ -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,