summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/timers.h2
-rw-r--r--src/timers.cpp2
2 files changed, 3 insertions, 1 deletions
diff --git a/include/timers.h b/include/timers.h
index 71ab8a153..28d5a9a10 100644
--- a/include/timers.h
+++ b/include/timers.h
@@ -90,7 +90,7 @@ class CoreExport Timer : public Extensible
*/
class CoreExport TimerManager : public Extensible
{
- protected:
+ friend class Timer;
/** A list of timers
*/
static std::vector<Timer *> Timers;
diff --git a/src/timers.cpp b/src/timers.cpp
index 0a40106d6..a8cef007b 100644
--- a/src/timers.cpp
+++ b/src/timers.cpp
@@ -72,6 +72,8 @@ time_t Timer::GetSetTime() const
void Timer::SetSecs(time_t t)
{
secs = t;
+ trigger = Anope::CurTime + t;
+ sort(TimerManager::Timers.begin(), TimerManager::Timers.end(), TimerManager::TimerComparison);
}
/** Returns the interval between ticks