diff options
author | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-10-21 23:46:24 +0000 |
---|---|---|
committer | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-10-21 23:46:24 +0000 |
commit | dcbb0ae938711cd49df73dc2ff6cd6289aeefb44 (patch) | |
tree | 82405b49cdba5a0e0f8819df367c75a5c24e455e /src/configreader.cpp | |
parent | d8f98565a8617658f610bc94a5d87266930beee4 (diff) |
Move command-line items to CommandLineConf
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11949 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/configreader.cpp')
-rw-r--r-- | src/configreader.cpp | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/src/configreader.cpp b/src/configreader.cpp index 20e244dcc..9a315fe0b 100644 --- a/src/configreader.cpp +++ b/src/configreader.cpp @@ -372,16 +372,14 @@ bool ParseStack::ParseExec(const std::string& name, int flags) ServerConfig::ServerConfig() { WhoWasGroupSize = WhoWasMaxGroups = WhoWasMaxKeep = 0; - log_file = NULL; - NoUserDns = forcedebug = OperSpyWhois = nofork = HideBans = HideSplits = UndernetMsgPrefix = false; - CycleHosts = writelog = AllowHalfop = InvBypassModes = true; + NoUserDns = OperSpyWhois = HideBans = HideSplits = UndernetMsgPrefix = false; + CycleHosts = AllowHalfop = InvBypassModes = true; dns_timeout = DieDelay = 5; MaxTargets = 20; NetBufferSize = 10240; SoftLimit = ServerInstance->SE->GetMaxFds(); MaxConn = SOMAXCONN; MaxWhoResults = 0; - debugging = 0; MaxChans = 20; OperMaxChans = 30; c_ipv4_range = 32; @@ -668,14 +666,14 @@ void ServerConfig::CrossCheckConnectBlocks(ServerConfig* current) } ClassMap newBlocksByMask; - Classes.resize(config_data.count("type")); + Classes.resize(config_data.count("connect")); std::map<std::string, int> names; bool try_again = true; for(int tries=0; try_again; tries++) { try_again = false; - ConfigTagList tags = ConfTags("type"); + ConfigTagList tags = ConfTags("connect"); int i=0; for(ConfigIter it = tags.first; it != tags.second; ++it, ++i) { @@ -843,8 +841,6 @@ void ServerConfig::Fill() dns_timeout = ConfValue("dns")->getInt("timeout", 5); DisabledCommands = ConfValue("disabled")->getString("commands", ""); DisabledDontExist = ConfValue("disabled")->getBool("fakenonexistant"); - SetUser = security->getString("runasuser"); - SetGroup = security->getString("runasgroup"); UserStats = security->getString("userstats"); CustomVersion = security->getString("customversion"); HideSplits = security->getBool("hidesplits"); @@ -992,12 +988,12 @@ void ServerConfig::Apply(ServerConfig* old, const std::string &useruid) for (int Index = 0; Index * sizeof(*Once) < sizeof(Once); Index++) { std::string tag = Once[Index]; - if (!ConfValue(tag)) - throw CoreException("You have not defined a <"+tag+"> tag, this is required."); ConfigTagList tags = ConfTags(tag); + if (tags.first == tags.second) + throw CoreException("You have not defined a <"+tag+"> tag, this is required."); + tags.first++; if (tags.first != tags.second) { - tags.first++; errstr << "You have more than one <" << tag << "> tag.\n" << "First occurrence at " << ConfValue(tag)->getTagLocation() << "; second occurrence at " << tags.first->second->getTagLocation() << std::endl; @@ -1034,8 +1030,7 @@ void ServerConfig::Apply(ServerConfig* old, const std::string &useruid) { this->ServerName = old->ServerName; this->sid = old->sid; - this->argv = old->argv; - this->argc = old->argc; + this->cmdline = old->cmdline; // Same for ports... they're bound later on first run. FailedPortList pl; |