summaryrefslogtreecommitdiff
path: root/src/configreader.cpp
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2013-07-10 13:26:58 +0100
committerPeter Powell <petpow@saberuk.com>2013-08-10 14:04:09 +0100
commite486994e8477e8b8ee02fa540b55700c9977e102 (patch)
tree8883d4a899ac7463b60191dc920b1b6987f3c625 /src/configreader.cpp
parenta129233dcd4356814c8c781b4c4dc1951c4ca44c (diff)
Warn if the server has no <bind> blocks.
Diffstat (limited to 'src/configreader.cpp')
-rw-r--r--src/configreader.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/configreader.cpp b/src/configreader.cpp
index f6a9bbd4b..8e5a1c2a9 100644
--- a/src/configreader.cpp
+++ b/src/configreader.cpp
@@ -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