aboutsummaryrefslogtreecommitdiff
path: root/src/modules.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2022-01-26 13:12:32 +0000
committerGravatar Sadie Powell2022-01-26 15:34:17 +0000
commitec46f6acda16b48a2d5620505e849f4e79de80d7 (patch)
tree3990d96570371d294b14d110d7baaa2020773fc3 /src/modules.cpp
parentSlim the included headers down more. (diff)
Replace consolecolors with a vendored library.
This library supports much more than consolecolors including the Windows 8 console API.
Diffstat (limited to 'src/modules.cpp')
-rw-r--r--src/modules.cpp12
1 files changed, 7 insertions, 5 deletions
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 <iostream>
#include "inspircd.h"
-#include "consolecolors.h"
#include "exitcodes.h"
+// Needs to be included after inspircd.h to avoid reincluding winsock.
+#include <rang/rang.hpp>
+
static insp::intrusive_list<dynamic_reference_base>* 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);
}
}