mirror of
https://github.com/anope/anope.git
synced 2026-07-05 22:53:13 +02:00
Only auto-add timers if they actually have a tick time.
This commit is contained in:
+4
-2
@@ -16,7 +16,8 @@ Timer::Timer(time_t time_from_now, bool repeating)
|
||||
, secs(time_from_now)
|
||||
, repeat(repeating)
|
||||
{
|
||||
TimerManager::AddTimer(this);
|
||||
if (time_from_now)
|
||||
TimerManager::AddTimer(this);
|
||||
}
|
||||
|
||||
Timer::Timer(Module *creator, time_t time_from_now, bool repeating)
|
||||
@@ -25,7 +26,8 @@ Timer::Timer(Module *creator, time_t time_from_now, bool repeating)
|
||||
, secs(time_from_now)
|
||||
, repeat(repeating)
|
||||
{
|
||||
TimerManager::AddTimer(this);
|
||||
if (time_from_now)
|
||||
TimerManager::AddTimer(this);
|
||||
}
|
||||
|
||||
Timer::~Timer()
|
||||
|
||||
Reference in New Issue
Block a user