diff options
author | Adam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864> | 2010-02-25 06:20:00 +0000 |
---|---|---|
committer | Adam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864> | 2010-02-25 06:20:00 +0000 |
commit | 235c4ae95c1cf467ec47514c2226df675494c12c (patch) | |
tree | 68fac6b16edd8e0024a7edb9ca1294d59bd62bd3 /src/modulemanager.cpp | |
parent | 54a60add71fc584765b8e575fdc699e93ec2ba84 (diff) |
Rewrote part of the Timer and CallBack code for modules to be sane
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2795 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/modulemanager.cpp')
-rw-r--r-- | src/modulemanager.cpp | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/modulemanager.cpp b/src/modulemanager.cpp index 90c76319c..0716e4503 100644 --- a/src/modulemanager.cpp +++ b/src/modulemanager.cpp @@ -467,16 +467,12 @@ bool ModuleManager::SetPriority(Module* mod, Implementation i, Priority s, Modul return true; } -/** Delete all timers attached to a module +/** Delete all callbacks attached to a module * @param m The module */ -void ModuleManager::ClearTimers(Module *m) +void ModuleManager::ClearCallBacks(Module *m) { - std::list<Timer *>::iterator it; - - for (it = m->CallBacks.begin(); it != m->CallBacks.end(); ++it) - { - TimerManager::DelTimer(*it); - } - m->CallBacks.clear(); + while (!m->CallBacks.empty()) + delete m->CallBacks.front(); } + |