1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-30 14:56:39 +02:00

irc: convert server option ipv6 from boolean to enum (disable, auto, force) (issue #2164)

This commit is contained in:
Sébastien Helleu
2024-08-02 23:16:49 +02:00
parent e051af0376
commit 5fe3b38892
6 changed files with 96 additions and 23 deletions
+5 -7
View File
@@ -5337,14 +5337,12 @@ irc_command_display_server (struct t_irc_server *server, int with_detail)
weechat_config_string (server->options[IRC_SERVER_OPTION_PROXY]));
/* ipv6 */
if (weechat_config_option_is_null (server->options[IRC_SERVER_OPTION_IPV6]))
weechat_printf (NULL, " ipv6 . . . . . . . . : (%s)",
(IRC_SERVER_OPTION_BOOLEAN(server, IRC_SERVER_OPTION_IPV6)) ?
_("on") : _("off"));
weechat_printf (NULL, " ipv6 . . . . . . . . : ('%s')",
irc_server_ipv6_string[IRC_SERVER_OPTION_ENUM(server, IRC_SERVER_OPTION_IPV6)]);
else
weechat_printf (NULL, " ipv6 . . . . . . . . : %s%s",
weechat_printf (NULL, " ipv6 . . . . . . . . : %s'%s'",
IRC_COLOR_CHAT_VALUE,
(weechat_config_boolean (server->options[IRC_SERVER_OPTION_IPV6])) ?
_("on") : _("off"));
irc_server_ipv6_string[weechat_config_enum (server->options[IRC_SERVER_OPTION_IPV6])]);
/* tls */
if (weechat_config_option_is_null (server->options[IRC_SERVER_OPTION_TLS]))
weechat_printf (NULL, " tls. . . . . . . . . : (%s)",
@@ -7289,7 +7287,7 @@ irc_command_init ()
AI(" /connect libera"),
AI(" /connect irc.oftc.net"),
AI(" /connect irc.oftc.net/6667 -notls"),
AI(" /connect irc6.oftc.net/9999 -ipv6"),
AI(" /connect irc6.oftc.net/9999 -ipv6=force"),
AI(" /connect my.server.org -password=test"),
AI(" /connect irc://nick@irc.oftc.net/#channel"),
AI(" /connect -switch")),