X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=include%2Fusers.h;h=0dfbc222367ee41f84de20559edc0b8421e606c5;hb=db11f2b24c6aeb5ab7ba4678638890bc68b1d0c1;hp=7b1e7ccc4a7480db96da55265b4e506ac9b17032;hpb=740b09e2aee345c6fde199986d8eab6e0db224e3;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/include/users.h b/include/users.h index 7b1e7ccc4..0dfbc2223 100644 --- a/include/users.h +++ b/include/users.h @@ -17,7 +17,7 @@ #include "inspircd_config.h" #include "channels.h" #include "connection.h" - +#include "inspstring.h" #include #ifndef __USERS_H__ @@ -57,16 +57,25 @@ class ConnectClass : public classbase /** Host mask for this line */ char host[MAXBUF]; + /** Number of seconds between pings for this line + */ + int pingtime; /** (Optional) Password for this line */ char pass[MAXBUF]; + + /** Threshold value for flood disconnect + */ + long threshold; ConnectClass() { registration_timeout = 0; flood = 0; - strcpy(host,""); - strcpy(pass,""); + pingtime = 0; + threshold = 0; + strlcpy(host,"",MAXBUF); + strlcpy(pass,"",MAXBUF); } }; @@ -155,6 +164,32 @@ class userrec : public connection */ char oper[NICKMAX]; + /** True when DNS lookups are completed. + */ + bool dns_done; + + /** Number of seconds between PINGs for this user (set from <connect:allow> tag + */ + unsigned long pingmax; + + /** Password specified by the user when they registered. + * This is stored even if the block doesnt need a password, so that + * modules may check it. + */ + char password[MAXBUF]; + + /** User's receive queue. + * Lines from the IRCd awaiting processing are stored here. + * Upgraded april 2005, old system a bit hairy. + */ + std::string recvq; + + /** Flood counters + */ + long lines_in; + time_t reset_due; + long threshold; + userrec(); virtual ~userrec() { } @@ -191,6 +226,11 @@ class userrec : public connection * this to their oper classes and checking the commands they can execute. */ bool HasPermission(char* command); + + bool userrec::AddBuffer(std::string a); + bool userrec::BufferIsReady(); + void userrec::ClearBuffer(); + std::string userrec::GetBuffer(); };