aboutsummaryrefslogtreecommitdiffstats
path: root/src/modulemanager.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2026-06-14 17:32:15 +0100
committerGravatar Sadie Powell2026-06-14 22:08:28 +0100
commitb65230cd34d53ec337b82d9f1dc8fcc543bd262e (patch)
treeafb9064639e00c800516c0a69d943d8abfbc4ab4 /src/modulemanager.cpp
parentFix building ssl_openssl on OpenSSL 4. (diff)
downloadinspircd++-b65230cd34d53ec337b82d9f1dc8fcc543bd262e.tar.gz
inspircd++-b65230cd34d53ec337b82d9f1dc8fcc543bd262e.tar.bz2
inspircd++-b65230cd34d53ec337b82d9f1dc8fcc543bd262e.zip
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.
Diffstat (limited to 'src/modulemanager.cpp')
-rw-r--r--src/modulemanager.cpp10
1 files changed, 1 insertions, 9 deletions
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<std::string, ServiceList>& 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<std::string, ServiceList>& 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("");
}