summaryrefslogtreecommitdiff
path: root/src/base.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/base.cpp')
-rw-r--r--src/base.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/base.cpp b/src/base.cpp
index 63b14256e..4111451f8 100644
--- a/src/base.cpp
+++ b/src/base.cpp
@@ -144,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;