Fix "auto" not being a valid options for <options:defaultbind>.

This fell back to the correct value but created a spurious message
in the server log.
This commit is contained in:
Sadie Powell 2023-06-07 13:20:09 +01:00
parent 78cd3898f5
commit edd34ffc51

View File

@ -313,6 +313,7 @@ void ServerConfig::Fill()
ServerDesc = server->getString("description", ServerName, 1);
Network = server->getString("network", ServerName, 1);
// Read the <options> config.
const auto& options = ConfValue("options");
DefaultModes = options->getString("defaultmodes", "not");
@ -326,8 +327,9 @@ void ServerConfig::Fill()
{ "yes", ServerConfig::BUT_RESTRICT_NOTIFY },
});
WildcardIPv6 = options->getEnum("defaultbind", CanCreateIPv6Socket(), {
{ "ipv4", false },
{ "ipv6", true },
{ "auto", CanCreateIPv6Socket() },
{ "ipv4", false },
{ "ipv6", true },
});
// Read the <performance> config.