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/modules.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/modules.cpp')
-rw-r--r-- | src/modules.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/modules.cpp b/src/modules.cpp index 773f87f66..8c38914e9 100644 --- a/src/modules.cpp +++ b/src/modules.cpp @@ -328,6 +328,10 @@ std::pair<int,std::string> InspIRCd::GetInterfaceInstanceCount(Module* m) const std::string& InspIRCd::GetModuleName(Module* m) { static std::string nothing = ""; /* Prevent compiler warning */ + + if (!this->GetModuleCount()) + return nothing; + for (int i = 0; i <= this->GetModuleCount(); i++) { if (this->modules[i] == m) |