diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2022-03-06 20:39:15 +0100 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2022-03-10 21:12:46 +0100 |
commit | 8c66070136a87d621bb6b38ed9dbc2af075cb009 (patch) | |
tree | bc6b097726bcdc53676645479c1e9c2219749f25 | |
parent | 9cfdb4a3249edba1a946a74ee3094c5533fa4f13 (diff) | |
download | weechat-8c66070136a87d621bb6b38ed9dbc2af075cb009.zip |
irc: rename server option "autojoin_record" to "autojoin_dynamic"
-rw-r--r-- | ChangeLog.adoc | 2 | ||||
-rw-r--r-- | src/plugins/irc/irc-command.c | 21 | ||||
-rw-r--r-- | src/plugins/irc/irc-config.c | 2 | ||||
-rw-r--r-- | src/plugins/irc/irc-server.c | 18 | ||||
-rw-r--r-- | src/plugins/irc/irc-server.h | 2 |
5 files changed, 23 insertions, 22 deletions
diff --git a/ChangeLog.adoc b/ChangeLog.adoc index 3c8029062..6008dd036 100644 --- a/ChangeLog.adoc +++ b/ChangeLog.adoc @@ -22,7 +22,7 @@ New features:: * core: search in message tags when tags are displayed with `/debug tags` * core: add support of date and tags in messages displayed in buffers with free content, add function printf_y_date_tags (issue #1746) - * irc: add command /autojoin, add server option "autojoin_record" + * irc: add command /autojoin, add server option "autojoin_dynamic" * irc: add IRC message tags in messages displayed (issue #1680) * relay: add `zstd` (https://facebook.github.io/zstd/[Zstandard]) compression in weechat protocol, remove option `compression` from `init` command, rename option relay.network.compression_level to relay.network.compression * trigger: add variables `${tg_tag_irc_xxx}` containing IRC message tags (issue #1680) diff --git a/src/plugins/irc/irc-command.c b/src/plugins/irc/irc-command.c index a40195e60..648ad3930 100644 --- a/src/plugins/irc/irc-command.c +++ b/src/plugins/irc/irc-command.c @@ -2732,7 +2732,7 @@ irc_command_join_server (struct t_irc_server *server, const char *arguments, { char *new_args, **channels, **keys, *pos_space, *pos_keys, *pos_channel; char *channel_name, *ptr_key; - int i, num_channels, num_keys, length, record; + int i, num_channels, num_keys, length, save_autojoin; time_t time_now; struct t_irc_channel *ptr_channel; @@ -2745,7 +2745,8 @@ irc_command_join_server (struct t_irc_server *server, const char *arguments, return; } - record = IRC_SERVER_OPTION_BOOLEAN(server, IRC_SERVER_OPTION_AUTOJOIN_RECORD); + save_autojoin = IRC_SERVER_OPTION_BOOLEAN(server, + IRC_SERVER_OPTION_AUTOJOIN_DYNAMIC); /* split channels and keys */ channels = NULL; @@ -2865,7 +2866,7 @@ irc_command_join_server (struct t_irc_server *server, const char *arguments, server, IRC_CHANNEL_TYPE_CHANNEL, pos_channel, 1, 1); } - if (record) + if (save_autojoin) { irc_join_add_channel_to_autojoin (server, pos_channel, ptr_key, 0); @@ -4241,7 +4242,7 @@ IRC_COMMAND_CALLBACK(part) irc_command_part_channel (ptr_server, channel_name, pos_args); - if (IRC_SERVER_OPTION_BOOLEAN(ptr_server, IRC_SERVER_OPTION_AUTOJOIN_RECORD)) + if (IRC_SERVER_OPTION_BOOLEAN(ptr_server, IRC_SERVER_OPTION_AUTOJOIN_DYNAMIC)) { channels = weechat_string_split (channel_name, ",", NULL, WEECHAT_STRING_SPLIT_STRIP_LEFT @@ -5235,15 +5236,15 @@ irc_command_display_server (struct t_irc_server *server, int with_detail) IRC_COLOR_CHAT_VALUE, weechat_config_string (server->options[IRC_SERVER_OPTION_AUTOJOIN])); - /* autojoin_record */ - if (weechat_config_option_is_null (server->options[IRC_SERVER_OPTION_AUTOJOIN_RECORD])) - weechat_printf (NULL, " autojoin_record. . . : (%s)", - (IRC_SERVER_OPTION_BOOLEAN(server, IRC_SERVER_OPTION_AUTOJOIN_RECORD)) ? + /* autojoin_dynamic */ + if (weechat_config_option_is_null (server->options[IRC_SERVER_OPTION_AUTOJOIN_DYNAMIC])) + weechat_printf (NULL, " autojoin_dynamic . . : (%s)", + (IRC_SERVER_OPTION_BOOLEAN(server, IRC_SERVER_OPTION_AUTOJOIN_DYNAMIC)) ? _("on") : _("off")); else - weechat_printf (NULL, " autojoin_record. . . : %s%s", + weechat_printf (NULL, " autojoin_dynamic . . : %s%s", IRC_COLOR_CHAT_VALUE, - (weechat_config_boolean (server->options[IRC_SERVER_OPTION_AUTOJOIN_RECORD])) ? + (weechat_config_boolean (server->options[IRC_SERVER_OPTION_AUTOJOIN_DYNAMIC])) ? _("on") : _("off")); /* autorejoin */ diff --git a/src/plugins/irc/irc-config.c b/src/plugins/irc/irc-config.c index 632c71170..716aebb90 100644 --- a/src/plugins/irc/irc-config.c +++ b/src/plugins/irc/irc-config.c @@ -2217,7 +2217,7 @@ irc_config_server_new_option (struct t_config_file *config_file, callback_change_data, NULL, NULL, NULL); break; - case IRC_SERVER_OPTION_AUTOJOIN_RECORD: + case IRC_SERVER_OPTION_AUTOJOIN_DYNAMIC: new_option = weechat_config_new_option ( config_file, section, option_name, "boolean", diff --git a/src/plugins/irc/irc-server.c b/src/plugins/irc/irc-server.c index 2b3923e19..6c1b8f408 100644 --- a/src/plugins/irc/irc-server.c +++ b/src/plugins/irc/irc-server.c @@ -107,7 +107,7 @@ char *irc_server_options[IRC_SERVER_NUM_OPTIONS][2] = { "command", "" }, { "command_delay", "0" }, { "autojoin", "" }, - { "autojoin_record", "off" }, + { "autojoin_dynamic", "off" }, { "autorejoin", "off" }, { "autorejoin_delay", "30" }, { "connection_timeout", "60" }, @@ -6290,8 +6290,8 @@ irc_server_add_to_infolist (struct t_infolist *infolist, if (!weechat_infolist_new_var_string (ptr_item, "autojoin", IRC_SERVER_OPTION_STRING(server, IRC_SERVER_OPTION_AUTOJOIN))) return 0; - if (!weechat_infolist_new_var_integer (ptr_item, "autojoin_record", - IRC_SERVER_OPTION_BOOLEAN(server, IRC_SERVER_OPTION_AUTOJOIN_RECORD))) + if (!weechat_infolist_new_var_integer (ptr_item, "autojoin_dynamic", + IRC_SERVER_OPTION_BOOLEAN(server, IRC_SERVER_OPTION_AUTOJOIN_DYNAMIC))) return 0; if (!weechat_infolist_new_var_integer (ptr_item, "autorejoin", IRC_SERVER_OPTION_BOOLEAN(server, IRC_SERVER_OPTION_AUTOREJOIN))) @@ -6652,14 +6652,14 @@ irc_server_print_log () else weechat_log_printf (" autojoin. . . . . . . . . : '%s'", weechat_config_string (ptr_server->options[IRC_SERVER_OPTION_AUTOJOIN])); - /* autojoin_record */ - if (weechat_config_option_is_null (ptr_server->options[IRC_SERVER_OPTION_AUTOJOIN_RECORD])) - weechat_log_printf (" autojoin_record . . . . . : null (%s)", - (IRC_SERVER_OPTION_BOOLEAN(ptr_server, IRC_SERVER_OPTION_AUTOJOIN_RECORD)) ? + /* autojoin_dynamic */ + if (weechat_config_option_is_null (ptr_server->options[IRC_SERVER_OPTION_AUTOJOIN_DYNAMIC])) + weechat_log_printf (" autojoin_dynamic. . . . . : null (%s)", + (IRC_SERVER_OPTION_BOOLEAN(ptr_server, IRC_SERVER_OPTION_AUTOJOIN_DYNAMIC)) ? "on" : "off"); else - weechat_log_printf (" autojoin_record . . . . . : %s", - (weechat_config_boolean (ptr_server->options[IRC_SERVER_OPTION_AUTOJOIN_RECORD])) ? + weechat_log_printf (" autojoin_dynamic. . . . . : %s", + (weechat_config_boolean (ptr_server->options[IRC_SERVER_OPTION_AUTOJOIN_DYNAMIC])) ? "on" : "off"); /* autorejoin */ if (weechat_config_option_is_null (ptr_server->options[IRC_SERVER_OPTION_AUTOREJOIN])) diff --git a/src/plugins/irc/irc-server.h b/src/plugins/irc/irc-server.h index f73f5af76..041364943 100644 --- a/src/plugins/irc/irc-server.h +++ b/src/plugins/irc/irc-server.h @@ -79,7 +79,7 @@ enum t_irc_server_option IRC_SERVER_OPTION_COMMAND, /* command to run once connected */ IRC_SERVER_OPTION_COMMAND_DELAY, /* delay after execution of command */ IRC_SERVER_OPTION_AUTOJOIN, /* channels to automatically join */ - IRC_SERVER_OPTION_AUTOJOIN_RECORD, /* auto set autojoin option */ + IRC_SERVER_OPTION_AUTOJOIN_DYNAMIC, /* auto set autojoin option */ IRC_SERVER_OPTION_AUTOREJOIN, /* auto rejoin channels when kicked */ IRC_SERVER_OPTION_AUTOREJOIN_DELAY, /* delay before auto rejoin */ IRC_SERVER_OPTION_CONNECTION_TIMEOUT, /* timeout for connection */ |