diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-12-23 16:40:09 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-12-23 16:40:09 +0000 |
commit | de3978c580edabe667d0845ed6027c9ff25e461b (patch) | |
tree | 1d49d99735e1b3ef50a5b42bee950e534ccabdf0 /src/configreader.cpp | |
parent | e04f190f6377e76d2f3c5b0ece40507f19531ae7 (diff) |
Fix bug in m_dnsbl, a condition is always matched because someone was using unsigned int to check a return val that can be -1 *slap w00t*
Change around the way exit codes are formed so that we can return a sensible exit code that reflects why inspircd exited
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6076 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 dde2d04db..f6c8ffbde 100644 --- a/src/configreader.cpp +++ b/src/configreader.cpp @@ -16,6 +16,7 @@ #include <fstream> #include "inspircd.h" #include "xline.h" +#include "exitcodes.h" std::vector<std::string> old_module_names, new_module_names, added_modules, removed_modules; @@ -152,7 +153,7 @@ bool ServerConfig::CheckOnce(char* tag, bool bail, userrec* user) if (bail) { printf("There were errors in your configuration:\nYou have more than one <%s> tag, this is not permitted.\n",tag); - InspIRCd::Exit(ERROR); + InspIRCd::Exit(EXIT_STATUS_CONFIG); } else { @@ -174,7 +175,7 @@ bool ServerConfig::CheckOnce(char* tag, bool bail, userrec* user) if (bail) { printf("There were errors in your configuration:\nYou have not defined a <%s> tag, this is required.\n",tag); - InspIRCd::Exit(ERROR); + InspIRCd::Exit(EXIT_STATUS_CONFIG); } else { @@ -552,7 +553,7 @@ void ServerConfig::ReportConfigError(const std::string &errormessage, bool bail, { /* Unneeded because of the ServerInstance->Log() aboive? */ printf("There were errors in your configuration:\n%s\n\n",errormessage.c_str()); - InspIRCd::Exit(ERROR); + InspIRCd::Exit(EXIT_STATUS_CONFIG); } else { |