From 834994a7ce3d0396f62eba4685443752f4744ab3 Mon Sep 17 00:00:00 2001 From: danieldg Date: Wed, 5 Aug 2009 00:16:28 +0000 Subject: 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 --- src/configreader.cpp | 7 ++++--- 1 file 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()) -- cgit v1.2.3