diff options
| author | 2005-12-07 21:16:47 +0000 | |
|---|---|---|
| committer | 2005-12-07 21:16:47 +0000 | |
| commit | aea429253a21458b74d1b052e975cd1cc4c1b08a (patch) | |
| tree | 6bdb512b3a108dc56033150471844250863ff61c /src/inspircd.cpp | |
| parent | Added OnUserQuit stuffs (diff) | |
| download | inspircd++-aea429253a21458b74d1b052e975cd1cc4c1b08a.tar.gz inspircd++-aea429253a21458b74d1b052e975cd1cc4c1b08a.tar.bz2 inspircd++-aea429253a21458b74d1b052e975cd1cc4c1b08a.zip | |
Added OnCleanup function
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2258 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/inspircd.cpp')
| -rw-r--r-- | src/inspircd.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/inspircd.cpp b/src/inspircd.cpp index f47cc339b..75c0833fc 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -2184,6 +2184,15 @@ bool UnloadModule(const char* filename) snprintf(MODERR,MAXBUF,"Module not unloadable (marked static)"); return false; } + /* Give the module a chance to tidy out all its metadata */ + for (chan_hash::iterator c = chanlist.begin(); c != chanlist.end(); c++) + { + modules[j]->OnCleanup(TYPE_CHANNEL,c->second); + } + for (user_hash::iterator u = userlist.begin(); u != userlist.end(); u++) + { + modules[j]->OnCleanup(TYPE_USER,u->second); + } FOREACH_MOD OnUnloadModule(modules[j],module_names[j]); // found the module log(DEBUG,"Deleting module..."); |
