diff options
author | jamie <jamie@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-10-02 23:14:53 +0000 |
---|---|---|
committer | jamie <jamie@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-10-02 23:14:53 +0000 |
commit | ab58b38578dfaeda2f53ba84e475ed9638e5f6da (patch) | |
tree | 72f80aaa55760434a696408dbce7e0640ce18f0f | |
parent | b7d4d9501e8fa7ed97d69bf89e4410d6b4908be9 (diff) |
Fix my last change to InspIRCd::Time()
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5402 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r-- | src/modules/m_joinflood.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
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; } }; |