1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-09 03:03:12 +02:00

irc: add option irc.look.display_extended_join (issue #320)

This commit is contained in:
Sébastien Helleu
2021-06-19 18:11:02 +02:00
parent eb2a42c99e
commit 5a89825669
25 changed files with 143 additions and 21 deletions
+8
View File
@@ -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",
+1
View File
@@ -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;
+4 -2
View File
@@ -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)",