1
0
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:
Sadie Powell
2024-11-17 12:13:45 +00:00
parent 240f8b9e50
commit 7a20f26b84
+4 -2
View File
@@ -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()