]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Fix some command registration warnings
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>
Tue, 19 Jan 2010 15:16:41 +0000 (15:16 +0000)
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>
Tue, 19 Jan 2010 15:16:41 +0000 (15:16 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12305 e03df62e-2008-0410-955e-edbf42e46eb7

include/inspircd.h
src/modules.cpp

index 89f0a08ee42fad27a8e29581791f056a6985be6d..44e6abe57791ca41cea8da10be8abc08d5101519 100644 (file)
@@ -813,7 +813,11 @@ class CommandModule : public Module
  public:
        CommandModule() : cmd(this)
        {
  public:
        CommandModule() : cmd(this)
        {
-               ServerInstance->AddCommand(&cmd);
+       }
+
+       void init()
+       {
+               ServerInstance->Modules->AddService(cmd);
        }
 
        Version GetVersion()
        }
 
        Version GetVersion()
index 656e7ce900b808b6be37c91039b507845c7e3c79..11b06e96042071c43069a1c4c55be870f69ddad8 100644 (file)
@@ -175,7 +175,7 @@ ModuleManager::~ModuleManager()
 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;
@@ -424,7 +424,7 @@ void ModuleManager::AddService(ServiceProvider& item)
 {
        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());
 
        switch (item.service)
        {
 
        switch (item.service)
        {