diff options
author | peavey <peavey@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-01-09 01:12:14 +0000 |
---|---|---|
committer | peavey <peavey@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-01-09 01:12:14 +0000 |
commit | 9f25dfcc5429a57aa191abfba00138c69acd59df (patch) | |
tree | 014d00476557e536d86b8cf063382609e23a604a /src/modules | |
parent | cf2d41558a0affc13f18bc2ec3a9c81d2a7b82ee (diff) |
Make safelist use repeat timer.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6270 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/m_safelist.cpp | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/modules/m_safelist.cpp b/src/modules/m_safelist.cpp index 7441f0ea5..b3ade5434 100644 --- a/src/modules/m_safelist.cpp +++ b/src/modules/m_safelist.cpp @@ -39,8 +39,6 @@ UserList listusers; /* vector of people doing a /list */ class ListTimer *timer; /** To create a timer which recurs every second, we inherit from InspTimer. - * InspTimer is only one-shot however, so at the end of each Tick() we simply - * insert another of ourselves into the pending queue :) */ class ListTimer : public InspTimer { @@ -54,7 +52,7 @@ class ListTimer : public InspTimer public: - ListTimer(InspIRCd* Instance, long interval) : InspTimer(interval,Instance->Time()), ServerInstance(Instance) + ListTimer(InspIRCd* Instance, long interval) : InspTimer(interval,Instance->Time(), true), ServerInstance(Instance) { ServerNameSize = 4 + strlen(ServerInstance->Config->ServerName); } @@ -143,12 +141,7 @@ class ListTimer : public InspTimer } } - if (listusers.size()) - { - timer = new ListTimer(ServerInstance,1); - ServerInstance->Timers->AddTimer(timer); - } - else + if (!listusers.size()) { timer = NULL; } |