diff options
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/irc/irc-config.c | 8 | ||||
-rw-r--r-- | src/plugins/irc/irc-config.h | 1 | ||||
-rw-r--r-- | src/plugins/irc/irc-protocol.c | 3 |
3 files changed, 11 insertions, 1 deletions
diff --git a/src/plugins/irc/irc-config.c b/src/plugins/irc/irc-config.c index a3b25ac91..eb89e4fdb 100644 --- a/src/plugins/irc/irc-config.c +++ b/src/plugins/irc/irc-config.c @@ -108,6 +108,7 @@ struct t_config_option *irc_config_look_notice_welcome_redirect = NULL; struct t_config_option *irc_config_look_notice_welcome_tags = NULL; struct t_config_option *irc_config_look_notify_tags_ison = NULL; struct t_config_option *irc_config_look_notify_tags_whois = NULL; +struct t_config_option *irc_config_look_open_pv_buffer_echo_msg = NULL; struct t_config_option *irc_config_look_part_closes_buffer = NULL; struct t_config_option *irc_config_look_pv_buffer = NULL; struct t_config_option *irc_config_look_pv_tags = NULL; @@ -3401,6 +3402,13 @@ irc_config_init () "\"notify_highlight\""), NULL, 0, 0, "notify_message", NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); + irc_config_look_open_pv_buffer_echo_msg = weechat_config_new_option ( + irc_config_file, irc_config_section_look, + "open_pv_buffer_echo_msg", "boolean", + N_("open a private buffer on self message when capability " + "echo-message is enabled"), + NULL, 0, 0, "on", NULL, 0, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); irc_config_look_part_closes_buffer = weechat_config_new_option ( irc_config_file, irc_config_section_look, "part_closes_buffer", "boolean", diff --git a/src/plugins/irc/irc-config.h b/src/plugins/irc/irc-config.h index c5d078bdc..41291e887 100644 --- a/src/plugins/irc/irc-config.h +++ b/src/plugins/irc/irc-config.h @@ -143,6 +143,7 @@ extern struct t_config_option *irc_config_look_notice_welcome_redirect; extern struct t_config_option *irc_config_look_notice_welcome_tags; extern struct t_config_option *irc_config_look_notify_tags_ison; extern struct t_config_option *irc_config_look_notify_tags_whois; +extern struct t_config_option *irc_config_look_open_pv_buffer_echo_msg; extern struct t_config_option *irc_config_look_part_closes_buffer; extern struct t_config_option *irc_config_look_pv_buffer; extern struct t_config_option *irc_config_look_pv_tags; diff --git a/src/plugins/irc/irc-protocol.c b/src/plugins/irc/irc-protocol.c index 4493bda84..370aa0b3f 100644 --- a/src/plugins/irc/irc-protocol.c +++ b/src/plugins/irc/irc-protocol.c @@ -3265,7 +3265,8 @@ IRC_PROTOCOL_CALLBACK(privmsg) if (strcmp (ptr_channel->name, remote_nick) != 0) irc_channel_pv_rename (server, ptr_channel, remote_nick); } - else if (!nick_is_me || !cap_echo_message) + else if (!nick_is_me || !cap_echo_message + || weechat_config_boolean (irc_config_look_open_pv_buffer_echo_msg)) { ptr_channel = irc_channel_new (server, IRC_CHANNEL_TYPE_PRIVATE, |