#endif
ServerConfig::ServerConfig()
+ : NoSnoticeStack(false)
{
WhoWasGroupSize = WhoWasMaxGroups = WhoWasMaxKeep = 0;
RawLog = NoUserDns = HideBans = HideSplits = UndernetMsgPrefix = false;
OperMaxChans = 30;
c_ipv4_range = 32;
c_ipv6_range = 128;
+
+ std::vector<KeyVal>* items;
+ EmptyTag = ConfigTag::create("empty", "<auto>", 0, items);
+}
+
+ServerConfig::~ServerConfig()
+{
+ delete EmptyTag;
}
void ServerConfig::Update005()
WelcomeNotice = options->getBool("welcomenotice", true);
range(SoftLimit, 10, ServerInstance->SE->GetMaxFds(), ServerInstance->SE->GetMaxFds(), "<performance:softlimit>");
- range(MaxConn, 0, SOMAXCONN, SOMAXCONN, "<performance:somaxconn>");
+ if (ConfValue("performance")->getBool("limitsomaxconn", true))
+ range(MaxConn, 0, SOMAXCONN, SOMAXCONN, "<performance:somaxconn>");
range(MaxTargets, 1, 31, 20, "<security:maxtargets>");
range(NetBufferSize, 1024, 65534, 10240, "<performance:netbuffersize>");
range(WhoWasGroupSize, 0, 10000, 10, "<whowas:groupsize>");
OperSpyWhois = SPYWHOIS_SINGLEMSG;
else
OperSpyWhois = SPYWHOIS_NONE;
-
- Limits.Finalise();
}
// WARNING: it is not safe to use most of the codebase in this function, as it
if (valid)
ServerInstance->WritePID(this->PID);
- if (old)
+ if (old && valid)
{
// On first run, ports are bound later on
FailedPortList pl;
User* user = useruid.empty() ? NULL : ServerInstance->FindNick(useruid);
if (!valid)
+ {
ServerInstance->Logs->Log("CONFIG",DEFAULT, "There were errors in your configuration file:");
+ Classes.clear();
+ }
while (errstr.good())
{
{
ConfigTagList found = config_data.equal_range(tag);
if (found.first == found.second)
- return NULL;
+ return EmptyTag;
ConfigTag* rv = found.first->second;
found.first++;
if (found.first != found.second)
* XXX: The order of these is IMPORTANT, do not reorder them without testing
* thoroughly!!!
*/
+ ServerInstance->Users->RehashCloneCounts();
ServerInstance->XLines->CheckELines();
ServerInstance->XLines->ApplyLines();
ServerInstance->Res->Rehash();