]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules.cpp
Only assign NewServices once the duplicate check is done.
[user/henk/code/inspircd.git] / src / modules.cpp
index 6c7929b1f6d5f87de2d07551ff92152436e1152e..17804a48edc93e7cc21a76761c64bb4044af43b4 100644 (file)
@@ -132,6 +132,7 @@ void                Module::OnUserInvite(User*, User*, Channel*, time_t, unsigned int, CUList&
 void           Module::OnPostTopicChange(User*, Channel*, const std::string&) { DetachEvent(I_OnPostTopicChange); }
 void           Module::OnDecodeMetaData(Extensible*, const std::string&, const std::string&) { DetachEvent(I_OnDecodeMetaData); }
 void           Module::OnChangeHost(User*, const std::string&) { DetachEvent(I_OnChangeHost); }
+void           Module::OnChangeRealHost(User*, const std::string&) { DetachEvent(I_OnChangeRealHost); }
 void           Module::OnChangeRealName(User*, const std::string&) { DetachEvent(I_OnChangeRealName); }
 void           Module::OnChangeIdent(User*, const std::string&) { DetachEvent(I_OnChangeIdent); }
 void           Module::OnAddLine(User*, XLine*) { DetachEvent(I_OnAddLine); }
@@ -479,12 +480,12 @@ void ModuleManager::LoadAll()
        {
                ConfigTag* tag = i->second;
                std::string name = ExpandModName(tag->getString("name"));
-               this->NewServices = &servicemap[name];
 
                // Skip modules which are already loaded.
                if (Modules.find(name) != Modules.end())
                        continue;
 
+               this->NewServices = &servicemap[name];
                std::cout << "[" << con_green << "*" << con_reset << "] Loading module:\t" << con_green << name << con_reset << std::endl;
                if (!this->Load(name, true))
                {