diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-12-23 15:14:54 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-12-23 15:14:54 +0000 |
commit | c1316150a7b0679494828b8acab8c8fa2c35fa7b (patch) | |
tree | 05982a9af5bdfa82d6107df3a2d10ebd3f05483e /src/inspircd.cpp | |
parent | f5f71bdfefb84ccb69712ef6ed9f5ffc43733678 (diff) |
Fix issue where the last module to be loaded wasnt unloaded by restart
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6074 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/inspircd.cpp')
-rw-r--r-- | src/inspircd.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/inspircd.cpp b/src/inspircd.cpp index b74fb4046..876bf7f29 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -80,20 +80,20 @@ void InspIRCd::Restart(const std::string &reason) /* This calls the constructor and closes the listening socket */ delete Config->openSockfd[i]; - /* We do this twice, so that any service providers get a chance to be - * unhooked by the modules using them, but then get a chance to be - * removed themsleves. + /* We do this more than once, so that any service providers get a + * chance to be* unhooked by the modules using them, but then get + * a chance to be removed themsleves. */ - for (int tries = 0; tries < 2; tries++) + for (int tries = 0; tries < 3; tries++) { MyModCount = this->GetModuleCount(); mymodnames.clear(); /* Unload all modules, so they get a chance to clean up their listeners */ - for (int j = 0; j < ModCount; j++) + for (int j = 0; j <= MyModCount; j++) mymodnames.push_back(Config->module_names[j]); - for (int k = 0; k < MyModCount; k++) + for (int k = 0; k <= MyModCount; k++) this->UnloadModule(mymodnames[k].c_str()); } |