From adf31d907ef02d689fd4cf134b3428ade358f7b9 Mon Sep 17 00:00:00 2001 From: brain Date: Wed, 4 Jan 2006 23:05:56 +0000 Subject: [PATCH] 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 --- src/inspircd.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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 -- 2.39.5