From 7e54de3ffa0f36900de29b06236864d97ce5dda7 Mon Sep 17 00:00:00 2001 From: brain Date: Tue, 5 Dec 2006 20:56:28 +0000 Subject: Fix up brokage git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5871 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules.cpp | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'src/modules.cpp') 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) -- cgit v1.2.3