Warn if the server has no <bind> blocks.

This commit is contained in:
Peter Powell 2013-07-10 13:26:58 +01:00
parent a129233dcd
commit e486994e84

View File

@ -566,7 +566,7 @@ void ServerConfig::Apply(ServerConfig* old, const std::string &useruid)
{
errstr << ' ' << ChangedConfig[index].key << "=\"" << ChangedConfig[index].value << "\"";
}
errstr << "> - " << ChangedConfig[index].reason << " (at " << i->second->getTagLocation() << ")\n";
errstr << "> - " << ChangedConfig[index].reason << " (at " << i->second->getTagLocation() << ")" << std::endl;
}
}
}
@ -589,6 +589,11 @@ void ServerConfig::Apply(ServerConfig* old, const std::string &useruid)
if (valid)
ServerInstance->WritePID(this->PID);
ConfigTagList binds = ConfTags("bind");
if (binds.first == binds.second)
errstr << "Possible configuration error: you have not defined any <bind> blocks." << std::endl
<< "You will need to do this if you want clients to be able to connect!" << std::endl;
if (old)
{
// On first run, ports are bound later on