From ec46f6acda16b48a2d5620505e849f4e79de80d7 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Wed, 26 Jan 2022 13:12:32 +0000 Subject: Replace consolecolors with a vendored library. This library supports much more than consolecolors including the Windows 8 console API. --- src/modules.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/modules.cpp') diff --git a/src/modules.cpp b/src/modules.cpp index 17657d906..5cff6ac29 100644 --- a/src/modules.cpp +++ b/src/modules.cpp @@ -34,9 +34,11 @@ #include #include "inspircd.h" -#include "consolecolors.h" #include "exitcodes.h" +// Needs to be included after inspircd.h to avoid reincluding winsock. +#include + static insp::intrusive_list* dynrefs = NULL; void dynamic_reference_base::reset_all() @@ -516,11 +518,11 @@ void ModuleManager::LoadAll() continue; this->NewServices = &servicemap[name]; - std::cout << "[" << con_green << "*" << con_reset << "] Loading module:\t" << con_green << name << con_reset << std::endl; + std::cout << "[" << rang::style::bold << rang::fg::green << "*" << rang::style::reset << "] Loading module:\t" << rang::style::bold << rang::fg::green << name << rang::style::reset << std::endl; if (!this->Load(name, true)) { ServerInstance->Logs.Log("MODULE", LOG_DEFAULT, this->LastError()); - std::cout << std::endl << "[" << con_red << "*" << con_reset << "] " << this->LastError() << std::endl << std::endl; + std::cout << std::endl << "[" << rang::style::bold << rang::fg::red << "*" << rang::style::reset << "] " << this->LastError() << std::endl << std::endl; ServerInstance->Exit(EXIT_STATUS_MODULE); } } @@ -539,7 +541,7 @@ void ModuleManager::LoadAll() { LastModuleError = "Unable to initialize " + modname + ": " + modexcept.GetReason(); ServerInstance->Logs.Log("MODULE", LOG_DEFAULT, LastModuleError); - std::cout << std::endl << "[" << con_red << "*" << con_reset << "] " << LastModuleError << std::endl << std::endl; + std::cout << std::endl << "[" << rang::style::bold << rang::fg::red << "*" << rang::style::reset << "] " << LastModuleError << std::endl << std::endl; ServerInstance->Exit(EXIT_STATUS_MODULE); } } @@ -561,7 +563,7 @@ void ModuleManager::LoadAll() { LastModuleError = "Unable to read the configuration for " + modname + ": " + modexcept.GetReason(); ServerInstance->Logs.Log("MODULE", LOG_DEFAULT, LastModuleError); - std::cout << std::endl << "[" << con_red << "*" << con_reset << "] " << LastModuleError << std::endl << std::endl; + std::cout << std::endl << "[" << rang::style::bold << rang::fg::red << "*" << rang::style::reset << "] " << LastModuleError << std::endl << std::endl; ServerInstance->Exit(EXIT_STATUS_CONFIG); } } -- cgit v1.3.1-10-gc9f91