X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=include%2Fusers.h;h=0dfbc222367ee41f84de20559edc0b8421e606c5;hb=db11f2b24c6aeb5ab7ba4678638890bc68b1d0c1;hp=a897d82821b9f7b6869e2df2872c0d4b712fe23f;hpb=80015fe115f37243e7b75a48312edb5a029fa229;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/include/users.h b/include/users.h index a897d8282..0dfbc2223 100644 --- a/include/users.h +++ b/include/users.h @@ -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();