]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_joinflood.cpp
Added <oper:swhois> to m_swhois, which will override <type:swhois> if specified
[user/henk/code/inspircd.git] / src / modules / m_joinflood.cpp
index 14e963f782e37495a891df992f8e4784520cf407..88092687af1bd791b1ae2816e785bea24c24eb48 100644 (file)
@@ -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 = time(NULL) + secs;
                counter = 0;
                locked = false;
        };
@@ -51,10 +52,10 @@ class joinfloodsettings : public classbase
        void addjoin()
        {
                counter++;
-               if (InspIRCd::Time() > reset)
+               if (time(NULL) > reset)
                {
                        counter = 0;
-                       reset = InspIRCd::Time() + secs;
+                       reset = time(NULL) + secs;
                }
        }
 
@@ -72,7 +73,7 @@ class joinfloodsettings : public classbase
        {
                if (locked)
                {
-                       if (InspIRCd::Time() > unlocktime)
+                       if (time(NULL) > unlocktime)
                        {
                                locked = false;
                                return false;
@@ -88,7 +89,7 @@ class joinfloodsettings : public classbase
        void lock()
        {
                locked = true;
-               unlocktime = InspIRCd::Time() + 60;
+               unlocktime = time(NULL) + 60;
        }
 
 };
@@ -284,7 +285,7 @@ class ModuleJoinFlood : public Module
        
        virtual Version GetVersion()
        {
-               return Version(1, 0, 0, 0, VF_COMMON | VF_VENDOR, API_VERSION);
+               return Version(1, 1, 0, 0, VF_COMMON | VF_VENDOR, API_VERSION);
        }
 };