X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodmanager_static.cpp;h=3b7d72baf6b0ac9a3587bb28c5f17824b3d28b42;hb=bb3aa2fb37071f48a5312df8688c0a6990644fbb;hp=bb8fda400bd33b8672a2bb8e26a67bd315b16a51;hpb=fcacc8e0306382bc3f938073092c3729d77e2b41;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modmanager_static.cpp b/src/modmanager_static.cpp index bb8fda400..3b7d72baf 100644 --- a/src/modmanager_static.cpp +++ b/src/modmanager_static.cpp @@ -21,6 +21,7 @@ #include "inspircd.h" #include "exitcodes.h" +#include #ifdef PURE_STATIC @@ -188,12 +189,12 @@ void ModuleManager::LoadAll() { ConfigTag* tag = i->second; std::string name = tag->getString("name"); - printf_c("[\033[1;32m*\033[0m] Loading module:\t\033[1;32m%s\033[0m\n",name.c_str()); + std::cout << "[" << con_green << "*" << con_reset << "] Loading module:\t" << con_green << name << con_reset << std::endl; if (!this->Load(name, true)) { ServerInstance->Logs->Log("MODULE", DEFAULT, this->LastError()); - printf_c("\n[\033[1;31m*\033[0m] %s\n\n", this->LastError().c_str()); + std::cout << std::endl << "[" << con_red << "*" << con_reset << "] " << this->LastError() << std::endl << std::endl; ServerInstance->Exit(EXIT_STATUS_MODULE); } } @@ -201,7 +202,7 @@ void ModuleManager::LoadAll() for(std::map::iterator i = Modules.begin(); i != Modules.end(); i++) { Module* mod = i->second; - try + try { mod->init(); } @@ -209,7 +210,7 @@ void ModuleManager::LoadAll() { LastModuleError = "Unable to initialize " + mod->ModuleSourceFile + ": " + modexcept.GetReason(); ServerInstance->Logs->Log("MODULE", DEFAULT, LastModuleError); - printf_c("\n[\033[1;31m*\033[0m] %s\n\n", LastModuleError.c_str()); + std::cout << std::endl << "[" << con_red << "*" << con_reset << "] " << LastModuleError << std::endl << std::endl; ServerInstance->Exit(EXIT_STATUS_MODULE); } }