diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/inspircd.cpp | 2 | ||||
-rw-r--r-- | src/modules.cpp | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/src/inspircd.cpp b/src/inspircd.cpp index 4d7c933c6..9523e13ca 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -2480,6 +2480,7 @@ bool UnloadModule(const char* filename) snprintf(MODERR,MAXBUF,"Module not unloadable (marked static)"); return false; } + FOREACH_MOD OnUnloadModule(modules[j],module_names[j]); // found the module log(DEBUG,"Deleting module..."); erase_module(j); @@ -2541,6 +2542,7 @@ bool LoadModule(const char* filename) { Module* m = factory[MODCOUNT+1]->factory->CreateModule(); modules[MODCOUNT+1] = m; + FOREACH_MOD OnLoadModule(m,filename_str); /* save the module and the module's classfactory, if * this isnt done, random crashes can occur :/ */ module_names.push_back(filename); diff --git a/src/modules.cpp b/src/modules.cpp index 6f2fc82ec..35372a71e 100644 --- a/src/modules.cpp +++ b/src/modules.cpp @@ -330,6 +330,7 @@ string_list Module::OnChannelSync(chanrec* chan) { string_list empty; return emp void Module::On005Numeric(std::string &output) { }; int Module::OnKill(userrec* source, userrec* dest, std::string reason) { return 0; }; void Module::OnLoadModule(Module* mod,std::string name) { }; +void Module::OnUnloadModule(Module* mod,std::string name) { }; void Module::OnBackgroundTimer(time_t curtime) { }; void Module::OnSendList(userrec* user, chanrec* channel, char mode) { }; int Module::OnPreCommand(std::string command, char **parameters, int pcnt, userrec *user) { return 0; }; |