git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12305
e03df62e-2008-0410-955e-
edbf42e46eb7
public:
CommandModule() : cmd(this)
{
public:
CommandModule() : cmd(this)
{
- ServerInstance->AddCommand(&cmd);
+ }
+
+ void init()
+ {
+ ServerInstance->Modules->AddService(cmd);
bool ModuleManager::Attach(Implementation i, Module* mod)
{
if (Modules.find(mod->ModuleSourceFile) == Modules.end())
bool ModuleManager::Attach(Implementation i, Module* mod)
{
if (Modules.find(mod->ModuleSourceFile) == Modules.end())
- ServerInstance->Logs->Log("MODULE", DEFAULT, "Module %s is attaching to hook %d in constructor; this does not handle exceptions correctly!", mod->ModuleSourceFile.c_str(), i);
+ ServerInstance->Logs->Log("MODULE", DEFAULT, "Module is attaching to hook %d in constructor; this does not handle exceptions correctly!", i);
if (std::find(EventHandlers[i].begin(), EventHandlers[i].end(), mod) != EventHandlers[i].end())
return false;
if (std::find(EventHandlers[i].begin(), EventHandlers[i].end(), mod) != EventHandlers[i].end())
return false;
{
Module* owner = item.creator;
if (Modules.find(owner->ModuleSourceFile) == Modules.end())
{
Module* owner = item.creator;
if (Modules.find(owner->ModuleSourceFile) == Modules.end())
- ServerInstance->Logs->Log("MODULE", DEFAULT, "Module %s is registering item %s in constructor; this does not handle exceptions correctly!", owner->ModuleSourceFile.c_str(), item.name.c_str());
+ ServerInstance->Logs->Log("MODULE", DEFAULT, "Module is registering item %s in constructor; this does not handle exceptions correctly!", item.name.c_str());