summaryrefslogtreecommitdiff
path: root/src/module.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2013-03-30 23:38:40 -0500
committerAdam <Adam@anope.org>2013-03-30 23:39:43 -0500
commit7e7556f06445d4d8e607ef514c9fb5009899db73 (patch)
treefde8e4e7c59f40183e215cd69ce0d042670b24b9 /src/module.cpp
parent111d6a917806fd3ce2269436d08d68bd7eb1d5ea (diff)
Merge usefulness of Timer and CallBack classes into Timer, and fix it to really work
Diffstat (limited to 'src/module.cpp')
-rw-r--r--src/module.cpp15
1 files changed, 2 insertions, 13 deletions
diff --git a/src/module.cpp b/src/module.cpp
index 4b13d7e94..91a7ed350 100644
--- a/src/module.cpp
+++ b/src/module.cpp
@@ -57,9 +57,9 @@ Module::~Module()
{
/* Detach all event hooks for this module */
ModuleManager::DetachAll(this);
- /* Clear any active callbacks this module has */
- ModuleManager::ClearCallBacks(this);
IdentifyRequest::ModuleUnload(this);
+ /* Clear any active timers this module has */
+ TimerManager::DeleteTimersFor(this);
std::list<Module *>::iterator it = std::find(ModuleManager::Modules.begin(), ModuleManager::Modules.end(), this);
if (it != ModuleManager::Modules.end())
@@ -111,14 +111,3 @@ int ModuleVersion::GetPatch() const
return this->version_patch;
}
-CallBack::CallBack(Module *mod, long time_from_now, time_t now, bool repeating) : Timer(time_from_now, now, repeating), m(mod)
-{
-}
-
-CallBack::~CallBack()
-{
- std::list<CallBack *>::iterator it = std::find(m->callbacks.begin(), m->callbacks.end(), this);
- if (it != m->callbacks.end())
- m->callbacks.erase(it);
-}
-