diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-12-05 20:56:28 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-12-05 20:56:28 +0000 |
commit | 7e54de3ffa0f36900de29b06236864d97ce5dda7 (patch) | |
tree | 30b942b34eae9ef24c3478bf35093933e7317c72 /src/modules.cpp | |
parent | ad62df7a957c28da2ab7afe67398a9def56dbba6 (diff) |
Fix up brokage
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5871 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules.cpp')
-rw-r--r-- | src/modules.cpp | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/modules.cpp b/src/modules.cpp index 2b5a07296..05119f9bb 100644 --- a/src/modules.cpp +++ b/src/modules.cpp @@ -251,8 +251,21 @@ Module* InspIRCd::FindFeature(const std::string &FeatureName) bool InspIRCd::PublishInterface(const std::string &InterfaceName, Module* Mod) { - Interfaces[InterfaceName].push_back(Mod); - return true; + interfacelist::iterator iter = Interfaces.find(InterfaceName); + + if (iter == Interfaces.end()) + { + modulelist ml; + ml.push_back(Mod); + Interfaces[InterfaceName] = ml; + return true; + } + else + { + iter->second.push_back(Mod); + return true; + } + return false; } bool InspIRCd::UnpublishInterface(const std::string &InterfaceName, Module* Mod) |