#include "inspircd.h"
#include "exitcodes.h"
+#include <iostream>
#ifdef PURE_STATIC
mod = (*it->second->init)();
mod->ModuleSourceFile = name;
mod->ModuleDLLManager = NULL;
+ mod->dying = false;
Modules[name] = mod;
if (defer)
{
{
Load("cmd_all", true);
Load("cmd_whowas.so", true);
+ Load("cmd_lusers.so", true);
ConfigTagList tags = ServerInstance->Config->ConfTags("module");
for(ConfigIter i = tags.first; i != tags.second; ++i)
{
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);
}
}
{
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);
}
}