From 6b37d1f7e9bd8d451ab920ab09aa2d2e24877d62 Mon Sep 17 00:00:00 2001 From: brain Date: Fri, 9 Feb 2007 18:13:13 +0000 Subject: Add and properly test the ability for an InspTimer to DelTimer itself from within its own Tick method. This wasnt supported before and would corrupt the iterator in the TickTimers() method of TimerManager. Non the less, peaveys new (perfectly sensible) fix broke it because i didnt document the caveat about DelTimer() :p This FIXES m_ident and possibly some other stuff. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6553 e03df62e-2008-0410-955e-edbf42e46eb7 --- include/timer.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/timer.h b/include/timer.h index 2d12d84e5..dbf83c2c8 100644 --- a/include/timer.h +++ b/include/timer.h @@ -111,7 +111,9 @@ class TimerManager : public Extensible /** A map of timergroups, each group has a specific trigger time */ typedef std::map timerlist; - + /** Set when ticking timers, to prevent deletion while iterating + */ + bool CantDeleteHere; private: /** The current timer set, a map of timergroups @@ -119,6 +121,9 @@ class TimerManager : public Extensible timerlist Timers; public: + /** Constructor + */ + TimerManager(); /** Tick all pending InspTimers * @param TIME the current system time */ -- cgit v1.2.3