diff --git a/src/twc-config.c b/src/twc-config.c index 91f0700..e9c94b5 100644 --- a/src/twc-config.c +++ b/src/twc-config.c @@ -43,6 +43,7 @@ char *twc_profile_option_names[TWC_PROFILE_NUM_OPTIONS] = "proxy_port", "proxy", "udp", + "ipv6", }; char *twc_profile_option_defaults[TWC_PROFILE_NUM_OPTIONS] = @@ -54,6 +55,7 @@ char *twc_profile_option_defaults[TWC_PROFILE_NUM_OPTIONS] = NULL, "off", "on", + "on", }; bool twc_profile_option_null_allowed[TWC_PROFILE_NUM_OPTIONS] = @@ -64,7 +66,8 @@ bool twc_profile_option_null_allowed[TWC_PROFILE_NUM_OPTIONS] = true, // we allow proxy information to be null true, // ------------------------------------- false, - false + false, + false, }; /** @@ -220,6 +223,11 @@ twc_config_init_option(struct t_config_section *section, description = "automatically load profile and connect to the Tox " "network when WeeChat starts"; break; + case TWC_PROFILE_OPTION_IPV6: + type = "boolean"; + description = "use IPv6 as well as IPv4 to connect to the Tox " + "network"; + break; case TWC_PROFILE_OPTION_MAX_FRIEND_REQUESTS: type = "integer"; description = "maximum amount of friend requests to retain before " diff --git a/src/twc-profile.c b/src/twc-profile.c index 5086026..03af8e1 100644 --- a/src/twc-profile.c +++ b/src/twc-profile.c @@ -230,6 +230,8 @@ twc_profile_load(struct t_twc_profile *profile) TWC_PROFILE_OPTION_INTEGER(profile, TWC_PROFILE_OPTION_PROXY_PORT); options->udp_disabled = !TWC_PROFILE_OPTION_BOOLEAN(profile, TWC_PROFILE_OPTION_UDP); + options->ipv6enabled = + TWC_PROFILE_OPTION_BOOLEAN(profile, TWC_PROFILE_OPTION_IPV6); if (options->proxy_enabled) { diff --git a/src/twc-profile.h b/src/twc-profile.h index ec3143e..36dd696 100644 --- a/src/twc-profile.h +++ b/src/twc-profile.h @@ -35,6 +35,7 @@ enum t_twc_profile_option TWC_PROFILE_OPTION_PROXY_PORT, TWC_PROFILE_OPTION_PROXY_ENABLED, TWC_PROFILE_OPTION_UDP, + TWC_PROFILE_OPTION_IPV6, TWC_PROFILE_NUM_OPTIONS, };