X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fconfigreader.cpp;h=1905b36d083412fb62e67c06550fe10f0c24a51e;hb=ac83d3b0d607f2bdc373365bc2f08f0cde023bf3;hp=9db1f2665499d4828026f50305321c7cbbbd4606;hpb=f2256deeefe9a9f57f6f6b902604c01138ad16cc;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/configreader.cpp b/src/configreader.cpp index 9db1f2665..1905b36d0 100644 --- a/src/configreader.cpp +++ b/src/configreader.cpp @@ -11,20 +11,6 @@ * --------------------------------------------------- */ -/* $Core */ -/* $CopyInstall: conf/inspircd.quotes.example $(CONPATH) */ -/* $CopyInstall: conf/inspircd.rules.example $(CONPATH) */ -/* $CopyInstall: conf/inspircd.motd.example $(CONPATH) */ -/* $CopyInstall: conf/inspircd.helpop-full.example $(CONPATH) */ -/* $CopyInstall: conf/inspircd.helpop.example $(CONPATH) */ -/* $CopyInstall: conf/inspircd.censor.example $(CONPATH) */ -/* $CopyInstall: conf/inspircd.filter.example $(CONPATH) */ -/* $CopyInstall: conf/inspircd.conf.example $(CONPATH) */ -/* $CopyInstall: conf/modules.conf.example $(CONPATH) */ -/* $CopyInstall: conf/opers.conf.example $(CONPATH) */ -/* $CopyInstall: conf/links.conf.example $(CONPATH) */ -/* $CopyInstall: tools/gdbargs $(BASE)/.gdbargs */ - #include "inspircd.h" #include #include "xline.h" @@ -36,7 +22,7 @@ ServerConfig::ServerConfig() { WhoWasGroupSize = WhoWasMaxGroups = WhoWasMaxKeep = 0; NoUserDns = OperSpyWhois = HideBans = HideSplits = UndernetMsgPrefix = false; - CycleHosts = InvBypassModes = true; + WildcardIPv6 = CycleHosts = InvBypassModes = true; dns_timeout = 5; MaxTargets = 20; NetBufferSize = 10240; @@ -465,7 +451,7 @@ void ServerConfig::Fill() DisabledCommands = ConfValue("disabled")->getString("commands", ""); DisabledDontExist = ConfValue("disabled")->getBool("fakenonexistant"); UserStats = security->getString("userstats"); - CustomVersion = security->getString("customversion"); + CustomVersion = security->getString("customversion", Network + " IRCd"); HideSplits = security->getBool("hidesplits"); HideBans = security->getBool("hidebans"); HideWhoisServer = security->getString("hidewhois"); @@ -484,7 +470,6 @@ void ServerConfig::Fill() WhoWasGroupSize = ConfValue("whowas")->getInt("groupsize"); WhoWasMaxGroups = ConfValue("whowas")->getInt("maxgroups"); WhoWasMaxKeep = ServerInstance->Duration(ConfValue("whowas")->getString("maxkeep")); - DieValue = ConfValue("die")->getString("value"); MaxChans = ConfValue("channels")->getInt("users", 20); OperMaxChans = ConfValue("channels")->getInt("opers", 60); c_ipv4_range = ConfValue("cidr")->getInt("ipv4clone", 32); @@ -513,6 +498,24 @@ void ServerConfig::Fill() if (!sid.empty() && !ServerInstance->IsSID(sid)) throw CoreException(sid + " is not a valid server ID. A server ID must be 3 characters long, with the first character a digit and the next two characters a digit or letter."); + std::string defbind = options->getString("defaultbind"); + if (assign(defbind) == "ipv4") + { + WildcardIPv6 = false; + } + else if (assign(defbind) == "ipv6") + { + WildcardIPv6 = true; + } + else + { + WildcardIPv6 = true; + int socktest = socket(AF_INET6, SOCK_STREAM, 0); + if (socktest < 0) + WildcardIPv6 = false; + else + close(socktest); + } ConfigTagList tags = ConfTags("uline"); for(ConfigIter i = tags.first; i != tags.second; ++i) {