summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2010-01-19 15:16:41 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2010-01-19 15:16:41 +0000
commit3cda2e0971d279b1840d1689bb2821a93d475a4e (patch)
treee121bf3b785b791672a91976b2e7e2df94a89e31
parent2aae57ca07b3de40feb72a21b2f2dea521665d80 (diff)
Fix some command registration warnings
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12305 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--include/inspircd.h6
-rw-r--r--src/modules.cpp4
2 files changed, 7 insertions, 3 deletions
diff --git a/include/inspircd.h b/include/inspircd.h
index 89f0a08ee..44e6abe57 100644
--- a/include/inspircd.h
+++ b/include/inspircd.h
@@ -813,7 +813,11 @@ class CommandModule : public Module
public:
CommandModule() : cmd(this)
{
- ServerInstance->AddCommand(&cmd);
+ }
+
+ void init()
+ {
+ ServerInstance->Modules->AddService(cmd);
}
Version GetVersion()
diff --git a/src/modules.cpp b/src/modules.cpp
index 656e7ce90..11b06e960 100644
--- a/src/modules.cpp
+++ b/src/modules.cpp
@@ -175,7 +175,7 @@ ModuleManager::~ModuleManager()
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;
@@ -424,7 +424,7 @@ void ModuleManager::AddService(ServiceProvider& item)
{
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)
{