diff options
| author | 2013-08-16 12:10:55 +0200 | |
|---|---|---|
| committer | 2013-08-30 13:15:10 +0200 | |
| commit | c202dea024542b9c6c6b771bb9a3a081d9eacdc5 (patch) | |
| tree | 64f4d5f5c18e685d3cd360107664eec644d5585d /src/modmanager_dynamic.cpp | |
| parent | Merge insp20 (diff) | |
Replace OnRehash() with ReadConfig() that is called on boot, on module load and on rehash
This eliminates the need for calling OnRehash() in init()
Diffstat (limited to 'src/modmanager_dynamic.cpp')
| -rw-r--r-- | src/modmanager_dynamic.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/modmanager_dynamic.cpp b/src/modmanager_dynamic.cpp index 750a1c448..64d2bf69c 100644 --- a/src/modmanager_dynamic.cpp +++ b/src/modmanager_dynamic.cpp @@ -74,8 +74,11 @@ bool ModuleManager::Load(const std::string& filename, bool defer) } else { + ConfigStatus confstatus; + AttachAll(newmod); newmod->init(); + newmod->ReadConfig(confstatus); Version v = newmod->GetVersion(); ServerInstance->Logs->Log("MODULE", LOG_DEFAULT, "New module introduced: %s (Module version %s)%s", @@ -228,6 +231,8 @@ void ModuleManager::LoadAll() } } + ConfigStatus confstatus; + for(std::map<std::string, Module*>::iterator i = Modules.begin(); i != Modules.end(); i++) { Module* mod = i->second; @@ -236,6 +241,7 @@ void ModuleManager::LoadAll() ServerInstance->Logs->Log("MODULE", LOG_DEBUG, "Initializing %s", i->first.c_str()); AttachAll(mod); mod->init(); + mod->ReadConfig(confstatus); } catch (CoreException& modexcept) { |
