From 7907a1f1cc78ca532547c824cd221060b57f4fff Mon Sep 17 00:00:00 2001 From: brain Date: Thu, 23 Feb 2006 19:39:38 +0000 Subject: Incorporating InspTimer into safelist as a test git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3301 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_safelist.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'src/modules/m_safelist.cpp') diff --git a/src/modules/m_safelist.cpp b/src/modules/m_safelist.cpp index 641fd7559..52e5e36a0 100644 --- a/src/modules/m_safelist.cpp +++ b/src/modules/m_safelist.cpp @@ -40,15 +40,36 @@ class ListData typedef std::vector UserList; +class ListTimer : public InspTimer +{ + private: + Server* Srv; + public: + ListTimer(long interval, Server* Me) : InspTimer(interval), Server(Me) + { + } + + Tick(time_t TIME) + { + log(DEBUG,"*** Timer tick!"); + MyTimer = new ListTimer(1); + Srv->AddTimer(MyTimer); + } +}; + class ModuleSafeList : public Module { private: Server *Srv; + ListTimer* MyTimer; UserList listusers; /* vector of people doing a /list */ public: ModuleSafeList(Server* Me) : Module::Module(Me) { Srv = Me; + + MyTimer = new ListTimer(1); + Srv->AddTimer(MyTimer,Me); } virtual ~ModuleSafeList() -- cgit v1.2.3