diff options
author | adam- <adam-@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-06-26 20:01:26 +0000 |
---|---|---|
committer | adam- <adam-@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-06-26 20:01:26 +0000 |
commit | 6b5786aa37f7197bde67a7faf7bf70001c50f26d (patch) | |
tree | c1544d2bfd793d20db6ab8edb16821ae378318cc /src/modulemanager.cpp | |
parent | dc8f7923f4c9cd685a338072bcc2bb351bf575d9 (diff) |
Changed module callbacks to use new Timer API
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2338 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/modulemanager.cpp')
-rw-r--r-- | src/modulemanager.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/modulemanager.cpp b/src/modulemanager.cpp index 24e334e65..ec8bf35d3 100644 --- a/src/modulemanager.cpp +++ b/src/modulemanager.cpp @@ -445,3 +445,21 @@ bool ModuleManager::SetPriority(Module* mod, Implementation i, Priority s, Modul return true; } + +/** Delete all timers attached to a module + * @param m The module + */ +void ModuleManager::ClearTimers(Module *m) +{ + std::list<Timer *>::iterator it; + Timer *t2; + + for (it = m->CallBacks.begin(); it != m->CallBacks.end(); ++it) + { + t2 = *it; + + TimerManager::DelTimer(t2); + } + + m->CallBacks.clear(); +} |