]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/timer.cpp
Add support for blocking tag messages with the deaf mode.
[user/henk/code/inspircd.git] / src / timer.cpp
index 8e11ee4a7448442d23ba01e935592cba096aa9f2..c499b7991e724904e1f63c033b2367ac9c35cdfb 100644 (file)
@@ -1,10 +1,14 @@
 /*
  * InspIRCd -- Internet Relay Chat Daemon
  *
+ *   Copyright (C) 2017 Sadie Powell <sadie@witchery.services>
+ *   Copyright (C) 2013-2014 Attila Molnar <attilamolnar@hush.com>
+ *   Copyright (C) 2012 Robby <robby@chatbelgie.be>
+ *   Copyright (C) 2009 Uli Schlachter <psychon@inspircd.org>
+ *   Copyright (C) 2009 Daniel De Graaf <danieldg@inspircd.org>
  *   Copyright (C) 2008 Robin Burchell <robin+git@viroteck.net>
  *   Copyright (C) 2007 Dennis Friis <peavey@inspircd.org>
- *   Copyright (C) 2006-2007 Craig Edwards <craigedwards@brainbox.cc>
- *   Copyright (C) 2006 Oliver Lupton <oliverlupton@gmail.com>
+ *   Copyright (C) 2006-2007, 2010 Craig Edwards <brain@inspircd.org>
  *
  * This file is part of InspIRCd.  InspIRCd is free software: you can
  * redistribute it and/or modify it under the terms of the GNU General Public
@@ -21,9 +25,8 @@
 
 
 #include "inspircd.h"
-#include "timer.h"
 
-void Timer::SetInterval(time_t newinterval)
+void Timer::SetInterval(unsigned int newinterval)
 {
        ServerInstance->Timers.DelTimer(this);
        secs = newinterval;
@@ -31,6 +34,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);