summaryrefslogtreecommitdiff
path: root/src/module.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2010-08-22 00:34:02 -0400
committerAdam <Adam@anope.org>2010-08-22 00:34:02 -0400
commitada65a3bafd3ae6738a80972cf0d2f31ad19a7ae (patch)
treeafde8d7594adc78beec8feb8090f4a990bd6a56b /src/module.cpp
parent8a4c6ae618f767d2a9335da40f507ddccfc77b4b (diff)
Added a classbase for the major classes, makes dynamic_reference invalidation really work.
This also cleans up a bit of the code in the modestacker.
Diffstat (limited to 'src/module.cpp')
-rw-r--r--src/module.cpp12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/module.cpp b/src/module.cpp
index 9431137b7..98eb9b4fd 100644
--- a/src/module.cpp
+++ b/src/module.cpp
@@ -37,6 +37,8 @@ Module::~Module()
for (i = 0; i < NUM_LANGS; ++i)
this->DeleteLanguage(i);
+ /* Detach all event hooks for this module */
+ ModuleManager::DetachAll(this);
/* Clear any active callbacks this module has */
ModuleManager::ClearCallBacks(this);
@@ -93,13 +95,3 @@ unsigned Version::GetBuild() const
return this->Build;
}
-Service::Service(Module *o, const Anope::string &n) : owner(o), name(n)
-{
- ModuleManager::RegisterService(this);
-}
-
-Service::~Service()
-{
- ModuleManager::UnregisterService(this);
-}
-