summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/plugins/irc/irc-config.c8
-rw-r--r--src/plugins/irc/irc-config.h1
-rw-r--r--src/plugins/irc/irc-protocol.c6
3 files changed, 13 insertions, 2 deletions
diff --git a/src/plugins/irc/irc-config.c b/src/plugins/irc/irc-config.c
index 2eb0b8635..5c2bee6d2 100644
--- a/src/plugins/irc/irc-config.c
+++ b/src/plugins/irc/irc-config.c
@@ -63,6 +63,7 @@ struct t_config_option *irc_config_look_display_away;
struct t_config_option *irc_config_look_display_ctcp_blocked;
struct t_config_option *irc_config_look_display_ctcp_reply;
struct t_config_option *irc_config_look_display_ctcp_unknown;
+struct t_config_option *irc_config_look_display_extended_join;
struct t_config_option *irc_config_look_display_host_join;
struct t_config_option *irc_config_look_display_host_join_local;
struct t_config_option *irc_config_look_display_host_quit;
@@ -2815,6 +2816,13 @@ irc_config_init ()
N_("display CTCP message even if it is unknown CTCP"),
NULL, 0, 0, "on", NULL, 0,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ irc_config_look_display_extended_join = weechat_config_new_option (
+ irc_config_file, ptr_section,
+ "display_extended_join", "boolean",
+ N_("display extra information in the JOIN messages: account name "
+ "and real name (capability extended-join must be enabled)"),
+ NULL, 0, 0, "on", NULL, 0,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
irc_config_look_display_host_join = weechat_config_new_option (
irc_config_file, ptr_section,
"display_host_join", "boolean",
diff --git a/src/plugins/irc/irc-config.h b/src/plugins/irc/irc-config.h
index 3f6a38e5c..d4f5c391b 100644
--- a/src/plugins/irc/irc-config.h
+++ b/src/plugins/irc/irc-config.h
@@ -103,6 +103,7 @@ extern struct t_config_option *irc_config_look_display_away;
extern struct t_config_option *irc_config_look_display_ctcp_blocked;
extern struct t_config_option *irc_config_look_display_ctcp_reply;
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_quit;
diff --git a/src/plugins/irc/irc-protocol.c b/src/plugins/irc/irc-protocol.c
index e75ed9224..2a7393fd1 100644
--- a/src/plugins/irc/irc-protocol.c
+++ b/src/plugins/irc/irc-protocol.c
@@ -1365,7 +1365,8 @@ IRC_PROTOCOL_CALLBACK(join)
((argv_eol[4][0] == ':') ? argv_eol[4] + 1 : argv_eol[4]) : NULL;
str_account[0] = '\0';
- if (pos_account)
+ if (pos_account
+ && weechat_config_boolean (irc_config_look_display_extended_join))
{
snprintf (str_account, sizeof (str_account),
"%s [%s%s%s]",
@@ -1376,7 +1377,8 @@ IRC_PROTOCOL_CALLBACK(join)
}
str_realname[0] = '\0';
- if (pos_realname)
+ if (pos_realname
+ && weechat_config_boolean (irc_config_look_display_extended_join))
{
snprintf (str_realname, sizeof (str_realname),
"%s (%s%s%s)",