diff options
| author | 2009-08-05 00:16:28 +0000 | |
|---|---|---|
| committer | 2009-08-05 00:16:28 +0000 | |
| commit | 834994a7ce3d0396f62eba4685443752f4744ab3 (patch) | |
| tree | 58514ed2a2e0579809a70887b8a293955f230a80 /src/configreader.cpp | |
| parent | Write .modulemanager after everything has finished, not in a loop. (diff) | |
| download | inspircd++-834994a7ce3d0396f62eba4685443752f4744ab3.tar.gz inspircd++-834994a7ce3d0396f62eba4685443752f4744ab3.tar.bz2 inspircd++-834994a7ce3d0396f62eba4685443752f4744ab3.zip | |
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
Diffstat (limited to 'src/configreader.cpp')
| -rw-r--r-- | src/configreader.cpp | 7 |
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()) |
