aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/m_spanningtree/main.cpp
diff options
context:
space:
mode:
authorGravatar attilamolnar2013-04-09 23:51:06 +0200
committerGravatar attilamolnar2013-04-21 18:00:09 +0200
commit1638ee61936bc91758be39c3463c6e46d0d655e7 (patch)
tree3ad0357587a58bc3845cb3a328bf3e95fadf2923 /src/modules/m_spanningtree/main.cpp
parentMerge pull request #495 from SaberUK/master+fix-libcpp (diff)
Timer changes and TimerManager enhancements
Timer::Tick() now has a bool return value: if false is returned the timer is deleted using operator delete, otherwise, if it's a repeating timer then it's rescheduled (readded) Timers are removed from the TimerManager automatically at destruction Timers are now stored in a multimap instead of a sorted vector
Diffstat (limited to 'src/modules/m_spanningtree/main.cpp')
-rw-r--r--src/modules/m_spanningtree/main.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/modules/m_spanningtree/main.cpp b/src/modules/m_spanningtree/main.cpp
index bd49a3075..029f5e888 100644
--- a/src/modules/m_spanningtree/main.cpp
+++ b/src/modules/m_spanningtree/main.cpp
@@ -70,7 +70,7 @@ void ModuleSpanningTree::init()
ServerInstance->Modules->AddService(commands->fhost);
ServerInstance->Modules->AddService(commands->fident);
ServerInstance->Modules->AddService(commands->fname);
- RefreshTimer = new CacheRefreshTimer(Utils);
+ RefreshTimer = new CacheRefreshTimer(this, Utils);
ServerInstance->Timers->AddTimer(RefreshTimer);
Implementation eventlist[] =
@@ -907,6 +907,7 @@ CullResult ModuleSpanningTree::cull()
{
Utils->cull();
ServerInstance->Timers->DelTimer(RefreshTimer);
+ delete RefreshTimer;
return this->Module::cull();
}