]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - include/users.h
Fixed some flood checking
[user/henk/code/inspircd.git] / include / users.h
index a897d82821b9f7b6869e2df2872c0d4b712fe23f..0dfbc222367ee41f84de20559edc0b8421e606c5 100644 (file)
@@ -63,12 +63,17 @@ class ConnectClass : public classbase
        /** (Optional) Password for this line
         */
        char pass[MAXBUF];
+
+       /** Threshold value for flood disconnect
+        */
+       long threshold;
        
        ConnectClass()
        {
                registration_timeout = 0;
                flood = 0;
                pingtime = 0;
+               threshold = 0;
                strlcpy(host,"",MAXBUF);
                strlcpy(pass,"",MAXBUF);
        }
@@ -179,6 +184,12 @@ class userrec : public connection
         */
        std::string recvq;
 
+       /** Flood counters
+        */
+       long lines_in;
+       time_t reset_due;
+       long threshold;
+
        userrec();
        
        virtual ~userrec() {  }
@@ -216,7 +227,7 @@ class userrec : public connection
         */
        bool HasPermission(char* command);
 
-       void userrec::AddBuffer(std::string a);
+       bool userrec::AddBuffer(std::string a);
        bool userrec::BufferIsReady();
        void userrec::ClearBuffer();
        std::string userrec::GetBuffer();