diff options
author | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-10-14 22:12:55 +0000 |
---|---|---|
committer | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-10-14 22:12:55 +0000 |
commit | dbf4d595433ecefeb61f1267ffa515a91c3ab548 (patch) | |
tree | 0e85976e4cd0b77a8fb54a6df54dee94265ac75c /src/modules/m_spanningtree | |
parent | 9c9386d71e1b317fa39cc251eb6450e14ec5929f (diff) |
Fix module unmapping with culled Module objects
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11875 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_spanningtree')
-rw-r--r-- | src/modules/m_spanningtree/main.cpp | 12 | ||||
-rw-r--r-- | src/modules/m_spanningtree/main.h | 6 |
2 files changed, 9 insertions, 9 deletions
diff --git a/src/modules/m_spanningtree/main.cpp b/src/modules/m_spanningtree/main.cpp index 9c0997d7c..afd40e0c9 100644 --- a/src/modules/m_spanningtree/main.cpp +++ b/src/modules/m_spanningtree/main.cpp @@ -772,17 +772,17 @@ void ModuleSpanningTree::OnRehash(User* user) Utils->ReadConfiguration(true); } -void ModuleSpanningTree::OnLoadModule(Module* mod, const std::string &name) +void ModuleSpanningTree::OnLoadModule(Module* mod) { - this->RedoConfig(mod, name); + this->RedoConfig(mod); } -void ModuleSpanningTree::OnUnloadModule(Module* mod, const std::string &name) +void ModuleSpanningTree::OnUnloadModule(Module* mod) { - this->RedoConfig(mod, name); + this->RedoConfig(mod); } -void ModuleSpanningTree::RedoConfig(Module* mod, const std::string &name) +void ModuleSpanningTree::RedoConfig(Module* mod) { /* If m_sha256.so is loaded (we use this for HMAC) or any module implementing a BufferedSocket interface is loaded, * then we need to re-read our config again taking this into account. @@ -794,7 +794,7 @@ void ModuleSpanningTree::RedoConfig(Module* mod, const std::string &name) if (ml && std::find(ml->begin(), ml->end(), mod) != ml->end()) IsBufferSocketModule = true; - if (name == "m_sha256.so" || IsBufferSocketModule) + if (mod->ModuleSourceFile == "m_sha256.so" || IsBufferSocketModule) { Utils->ReadConfiguration(true); } diff --git a/src/modules/m_spanningtree/main.h b/src/modules/m_spanningtree/main.h index 66b396171..be9c460d9 100644 --- a/src/modules/m_spanningtree/main.h +++ b/src/modules/m_spanningtree/main.h @@ -49,7 +49,7 @@ class ModuleSpanningTree : public Module CommandRSQuit* command_rsquit; SpanningTreeUtilities* Utils; - void RedoConfig(Module* mod, const std::string &name); + void RedoConfig(Module* mod); public: CacheRefreshTimer *RefreshTimer; @@ -188,8 +188,8 @@ class ModuleSpanningTree : public Module ModResult OnSetAway(User* user, const std::string &awaymsg); void ProtoSendMode(void* opaque, TargetTypeFlags target_type, void* target, const std::vector<std::string> &modeline, const std::vector<TranslateType> &translate); void ProtoSendMetaData(void* opaque, Extensible* target, const std::string &extname, const std::string &extdata); - void OnLoadModule(Module* mod,const std::string &name); - void OnUnloadModule(Module* mod,const std::string &name); + void OnLoadModule(Module* mod); + void OnUnloadModule(Module* mod); bool cull(); ~ModuleSpanningTree(); Version GetVersion(); |