diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-01-04 23:05:56 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-01-04 23:05:56 +0000 |
commit | adf31d907ef02d689fd4cf134b3428ade358f7b9 (patch) | |
tree | c92d2edd9011ce0d3dd8e175e7050be10e455088 | |
parent | 6665a0f94c7549f7dd644c5e045ccca4a5c41172 (diff) |
Renumber the implement lists after a module is unloaded
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2734 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r-- | src/inspircd.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/inspircd.cpp b/src/inspircd.cpp index e778370a5..2df5b8688 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -315,8 +315,15 @@ bool InspIRCd::UnloadModule(const char* filename) Config->global_implementation[t] -= Config->implement_lists[j][t]; } - /* TODO: We have to renumber implement_lists after unload because the module numbers change! + /* We have to renumber implement_lists after unload because the module numbers change! */ + for(int j2 = j; j2 < 254; j2++) + { + for(int t = 0; t < 255; t++) + { + Config->implement_lists[j2][t] = Config->implement_lists[j2+1][t]; + } + } FOREACH_MOD(I_OnUnloadModule,OnUnloadModule(modules[j],Config->module_names[j])); // found the module |