From ab58b38578dfaeda2f53ba84e475ed9638e5f6da Mon Sep 17 00:00:00 2001 From: jamie Date: Mon, 2 Oct 2006 23:14:53 +0000 Subject: Fix my last change to InspIRCd::Time() git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5402 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_joinflood.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/modules') diff --git a/src/modules/m_joinflood.cpp b/src/modules/m_joinflood.cpp index 14e963f78..1290e9980 100644 --- a/src/modules/m_joinflood.cpp +++ b/src/modules/m_joinflood.cpp @@ -38,12 +38,13 @@ class joinfloodsettings : public classbase time_t unlocktime; int counter; bool locked; - + InspIRCd* ServerInstance; + joinfloodsettings() : secs(0), joins(0) {}; joinfloodsettings(int b, int c) : secs(b), joins(c) { - reset = InspIRCd::Time() + secs; + reset = ServerInstance->Time() + secs; counter = 0; locked = false; }; @@ -51,10 +52,10 @@ class joinfloodsettings : public classbase void addjoin() { counter++; - if (InspIRCd::Time() > reset) + if (ServerInstance->Time() > reset) { counter = 0; - reset = InspIRCd::Time() + secs; + reset = ServerInstance->Time() + secs; } } @@ -72,7 +73,7 @@ class joinfloodsettings : public classbase { if (locked) { - if (InspIRCd::Time() > unlocktime) + if (ServerInstance->Time() > unlocktime) { locked = false; return false; @@ -88,7 +89,7 @@ class joinfloodsettings : public classbase void lock() { locked = true; - unlocktime = InspIRCd::Time() + 60; + unlocktime = ServerInstance->Time() + 60; } }; -- cgit v1.2.3