]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/timer.cpp
Merge pull request #1162 from SaberUK/insp20+fix-deinstall
[user/henk/code/inspircd.git] / src / timer.cpp
index ec0ddb6456c978b3e293775709e396c3148e8dfe..e04a186cffbbe30eaa55fadbd8584239ad6c0a7e 100644 (file)
@@ -1,23 +1,38 @@
-/*       +------------------------------------+
- *       | Inspire Internet Relay Chat Daemon |
- *       +------------------------------------+
+/*
+ * InspIRCd -- Internet Relay Chat Daemon
  *
- *  InspIRCd: (C) 2002-2009 InspIRCd Development Team
- * See: http://www.inspircd.org/wiki/index.php/Credits
+ *   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>
  *
- * This program is free but copyrighted software; see
- *            the file COPYING for details.
+ * 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
+ * License as published by the Free Software Foundation, version 2.
  *
- * ---------------------------------------------------
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+
 /* $Core */
 
 #include "inspircd.h"
 #include "timer.h"
 
-TimerManager::TimerManager(InspIRCd* Instance) : ServerInstance(Instance)
+TimerManager::TimerManager()
+{
+}
+
+TimerManager::~TimerManager()
 {
+       for(std::vector<Timer *>::iterator i = Timers.begin(); i != Timers.end(); i++)
+               delete *i;
 }
 
 void TimerManager::TickTimers(time_t TIME)
@@ -55,7 +70,7 @@ void TimerManager::DelTimer(Timer* T)
 void TimerManager::AddTimer(Timer* T)
 {
        Timers.push_back(T);
-       sort(Timers.begin(), Timers.end(), TimerManager::TimerComparison);
+       std::sort(Timers.begin(), Timers.end(), TimerManager::TimerComparison);
 }
 
 bool TimerManager::TimerComparison( Timer *one, Timer *two)