Added option for enabling/disabling IPv6.

master
Håvard Pettersson 10 years ago
parent 41d6c80de7
commit a10b923ef9

@ -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 "

@ -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)
{

@ -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,
};

Loading…
Cancel
Save