diff options
| author | 2023-07-13 13:31:06 +0100 | |
|---|---|---|
| committer | 2023-07-13 14:07:26 +0100 | |
| commit | b4e3e973297db456f0ba8d7fdb8bbfc9c8426ea7 (patch) | |
| tree | 6e642a3690d163861d6d14e86b57ccf300bd3e0c /src/modules.cpp | |
| parent | Error out if CMake is used on non-Windows. (diff) | |
Simplify the codes that InspIRCd can exit with.
The custom codes that InspIRCd exits with are not very useful and can confuse init systems like systemd which assume that certain
exit codes mean certain things. INSPIRCD_BINARY_EXIT was a workaround
for this in v3 but considering thatsers have to check the logs anyway
so we may as well just use EXIT_SUCCESS and EXIT_FAILURE.
Diffstat (limited to 'src/modules.cpp')
| -rw-r--r-- | src/modules.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/modules.cpp b/src/modules.cpp index 13c73cb28..c400b1100 100644 --- a/src/modules.cpp +++ b/src/modules.cpp @@ -33,7 +33,6 @@ #include <fmt/color.h> #include "inspircd.h" -#include "exitcodes.h" #include "dynamic.h" #include "utility/map.h" @@ -540,7 +539,7 @@ void ModuleManager::LoadAll() fmt::println(""); fmt::println("[{}] {}", fmt::styled("*", fmt::emphasis::bold | fmt::fg(fmt::terminal_color::red)), LastError()); fmt::println(""); - ServerInstance->Exit(EXIT_STATUS_MODULE); + ServerInstance->Exit(EXIT_FAILURE); } } @@ -561,7 +560,7 @@ void ModuleManager::LoadAll() fmt::println(""); fmt::println("[{}] {}", fmt::styled("*", fmt::emphasis::bold | fmt::fg(fmt::terminal_color::red)), LastModuleError); fmt::println(""); - ServerInstance->Exit(EXIT_STATUS_MODULE); + ServerInstance->Exit(EXIT_FAILURE); } } @@ -585,12 +584,12 @@ void ModuleManager::LoadAll() fmt::println(""); fmt::println("[{}] {}", fmt::styled("*", fmt::emphasis::bold | fmt::fg(fmt::terminal_color::red)), LastModuleError); fmt::println(""); - ServerInstance->Exit(EXIT_STATUS_CONFIG); + ServerInstance->Exit(EXIT_FAILURE); } } if (!PrioritizeHooks()) - ServerInstance->Exit(EXIT_STATUS_MODULE); + ServerInstance->Exit(EXIT_FAILURE); } std::string& ModuleManager::LastError() |
