From ada65a3bafd3ae6738a80972cf0d2f31ad19a7ae Mon Sep 17 00:00:00 2001 From: Adam Date: Sun, 22 Aug 2010 00:34:02 -0400 Subject: 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. --- src/module.cpp | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'src/module.cpp') 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); -} - -- cgit