]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/timer.cpp
Call the OnUserInit hook from earlier in UserManager::AddUser.
[user/henk/code/inspircd.git] / src / timer.cpp
index 1c8de4cb98f019be1c8e6cee9f6d840f48e5fa4f..48ad79df7207e246bddb84a69df1cf9859ac487d 100644 (file)
@@ -22,7 +22,7 @@
 
 #include "inspircd.h"
 
-void Timer::SetInterval(time_t newinterval)
+void Timer::SetInterval(unsigned int newinterval)
 {
        ServerInstance->Timers.DelTimer(this);
        secs = newinterval;
@@ -30,6 +30,13 @@ void Timer::SetInterval(time_t newinterval)
        ServerInstance->Timers.AddTimer(this);
 }
 
+Timer::Timer(unsigned int secs_from_now, bool repeating)
+       : trigger(ServerInstance->Time() + secs_from_now)
+       , secs(secs_from_now)
+       , repeat(repeating)
+{
+}
+
 Timer::~Timer()
 {
        ServerInstance->Timers.DelTimer(this);