summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-08-05 00:16:28 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-08-05 00:16:28 +0000
commit834994a7ce3d0396f62eba4685443752f4744ab3 (patch)
tree58514ed2a2e0579809a70887b8a293955f230a80
parent690690ecdc8d3e39013787ea527a5770d57ac4a6 (diff)
Fix config errors being detected even if there were none
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11493 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/configreader.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/configreader.cpp b/src/configreader.cpp
index 5ae64f8c3..fd1b041fc 100644
--- a/src/configreader.cpp
+++ b/src/configreader.cpp
@@ -1196,11 +1196,12 @@ void ServerConfig::Apply(ServerConfig* old, const std::string &useruid)
User* user = useruid.empty() ? NULL : ServerInstance->FindNick(useruid);
+ errors = errstr.str().empty();
+ if (errors)
+ ServerInstance->Logs->Log("CONFIG",DEFAULT, "There were errors in your configuration file:");
+
while (errstr.good())
{
- if (errors == false)
- ServerInstance->Logs->Log("CONFIG",DEFAULT, "There were errors in your configuration file:");
- errors = true; // XXX: has to be a nicer way to accomplish this.
std::string line;
getline(errstr, line, '\n');
if (!line.empty())