]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/base.cpp
Add socket into the SocketEngine as soon as possible in UserManager::AddUser()
[user/henk/code/inspircd.git] / src / base.cpp
index 496b23ef54e914832ebc8692e2f128f649356005..0ff3fbe4c303256865110bd050492abdeb7c6de2 100644 (file)
@@ -95,6 +95,10 @@ ServiceProvider::~ServiceProvider()
 {
 }
 
+void ServiceProvider::RegisterService()
+{
+}
+
 ExtensionItem::ExtensionItem(const std::string& Key, ExtensibleType exttype, Module* mod)
        : ServiceProvider(mod, Key, SERVICE_METADATA)
        , type(exttype)
@@ -140,6 +144,12 @@ void* ExtensionItem::unset_raw(Extensible* container)
        return rv;
 }
 
+void ExtensionItem::RegisterService()
+{
+       if (!ServerInstance->Extensions.Register(this))
+               throw ModuleException("Extension already exists: " + name);
+}
+
 bool ExtensionManager::Register(ExtensionItem* item)
 {
        return types.insert(std::make_pair(item->name, item)).second;