* ---------------------------------------------------
*/
-/* $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 <fstream>
#include "xline.h"
{
WhoWasGroupSize = WhoWasMaxGroups = WhoWasMaxKeep = 0;
NoUserDns = OperSpyWhois = HideBans = HideSplits = UndernetMsgPrefix = false;
- CycleHosts = InvBypassModes = true;
+ WildcardIPv6 = CycleHosts = InvBypassModes = true;
dns_timeout = 5;
MaxTargets = 20;
NetBufferSize = 10240;
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");
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);
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)
{