From b65230cd34d53ec337b82d9f1dc8fcc543bd262e Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Sun, 14 Jun 2026 17:32:15 +0100 Subject: Improve the output printed when starting up. * Use a better startup message with links to documentation and other useful pages. * Use a red "Error!" and a yellow "Warning!" prefix consistently for all errors and warnings respectively. * Don't mention loading core modules. This is an implementation detail that isn't really relevant for most users. * Avoid printing unnecessary whitespace around module errors. --- src/modulemanager.cpp | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'src/modulemanager.cpp') diff --git a/src/modulemanager.cpp b/src/modulemanager.cpp index ed46aff14..1962dd3f6 100644 --- a/src/modulemanager.cpp +++ b/src/modulemanager.cpp @@ -127,9 +127,6 @@ bool ModuleManager::Load(const std::string& modname, bool defer) /* We must load the modules AFTER initializing the socket engine, now */ void ModuleManager::LoadCoreModules(std::map& servicemap) { - fmt::print("Loading core modules "); - fflush(stdout); - try { for (const auto& entry : std::filesystem::directory_iterator(ServerInstance->Config->Paths.Module)) @@ -141,24 +138,19 @@ void ModuleManager::LoadCoreModules(std::map& servicem if (!InspIRCd::Match(name, "core_*" DLL_EXTENSION)) continue; - fmt::print("."); fflush(stdout); this->NewServices = &servicemap[name]; if (!Load(name, true)) { - fmt::println(""); fmt::println("[{}] {}", fmt::styled("*", fmt::emphasis::bold | fmt::fg(fmt::terminal_color::red)), LastError()); - fmt::println(""); ServerInstance->Exit(EXIT_FAILURE); } } } catch (const std::filesystem::filesystem_error& err) { - fmt::println("failed: {}", err.what()); + fmt::println("{} {}", fmt::styled("Error!", fmt::emphasis::bold | fmt::fg(fmt::terminal_color::red)), err.what()); ServerInstance->Exit(EXIT_FAILURE); } - - fmt::println(""); } -- cgit v1.3.1-10-gc9f91