From 1200d6285b1d64699c6fa2c8241e2ee40f52d2a3 Mon Sep 17 00:00:00 2001 From: w00t Date: Thu, 23 Oct 2008 21:39:00 +0000 Subject: Revert earlier time() -> SI->Time() diff for now, this causes problems with dns.cpp in mysterious ways.. seemingly a bad pointer there somehow..? git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10695 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_joinflood.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/modules/m_joinflood.cpp') diff --git a/src/modules/m_joinflood.cpp b/src/modules/m_joinflood.cpp index 40a007c2c..33ba98aa4 100644 --- a/src/modules/m_joinflood.cpp +++ b/src/modules/m_joinflood.cpp @@ -33,7 +33,7 @@ class joinfloodsettings : public classbase joinfloodsettings(int b, int c) : secs(b), joins(c) { - reset = ServerInstance->Time() + secs; + reset = time(NULL) + secs; counter = 0; locked = false; }; @@ -41,10 +41,10 @@ class joinfloodsettings : public classbase void addjoin() { counter++; - if (ServerInstance->Time() > reset) + if (time(NULL) > reset) { counter = 0; - reset = ServerInstance->Time() + secs; + reset = time(NULL) + secs; } } @@ -62,7 +62,7 @@ class joinfloodsettings : public classbase { if (locked) { - if (ServerInstance->Time() > unlocktime) + if (time(NULL) > unlocktime) { locked = false; return false; @@ -78,7 +78,7 @@ class joinfloodsettings : public classbase void lock() { locked = true; - unlocktime = ServerInstance->Time() + 60; + unlocktime = time(NULL) + 60; } }; -- cgit v1.2.3