X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=include%2Fusers.h;h=385cd2dfe5703fc1f6412d634eed58de3c11f559;hb=bd5c443a6a7e93df59e0ef23aacba46b0916a8da;hp=fbeba1bb9fa4fe938f6d4030749218041414bf3b;hpb=548eacee47a757beb90226f3f8a36ba94619bee6;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/include/users.h b/include/users.h index fbeba1bb9..385cd2dfe 100644 --- a/include/users.h +++ b/include/users.h @@ -59,7 +59,7 @@ enum RegistrationState { /* Required forward declaration */ class Channel; class UserResolver; -class ConfigTag; +struct ConfigTag; /** Holds information relevent to <connect allow> and <connect deny> tags in the config file. */ @@ -291,16 +291,6 @@ class CoreExport User : public StreamSocket */ int cmds_out; - /** True if user has authenticated, false if otherwise - */ - bool haspassed; - - /** Used by User to indicate the registration status of the connection - * It is a bitfield of the REG_NICK, REG_USER and REG_ALL bits to indicate - * the connection state. - */ - char registered; - /** Time the connection was last pinged */ time_t lastping; @@ -400,28 +390,43 @@ class CoreExport User : public StreamSocket */ std::string oper; - /** True when DNS lookups are completed. - * The UserResolver classes res_forward and res_reverse will - * set this value once they complete. - */ - bool dns_done; - /** 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. */ std::string password; + /** This value contains how far into the penalty threshold the user is. Once its over + * the penalty threshold then commands are held and processed on-timer. + */ + int Penalty; + + /** Used by User to indicate the registration status of the connection + * It is a bitfield of the REG_NICK, REG_USER and REG_ALL bits to indicate + * the connection state. + */ + unsigned int registered:3; + + /** True when DNS lookups are completed. + * The UserResolver classes res_forward and res_reverse will + * set this value once they complete. + */ + unsigned int dns_done:1; + /** Whether or not to send an snotice about this user's quitting */ - bool quietquit; + unsigned int quietquit:1; /** If this is set to true, then all socket operations for the user * are dropped into the bit-bucket. * This value is set by QuitUser, and is not needed seperately from that call. * Please note that setting this value alone will NOT cause the user to quit. */ - bool quitting; + unsigned int quitting:1; + + /** This is true if the user matched an exception (E:Line). It is used to save time on ban checks. + */ + unsigned int exempt:1; /** Server address and port that this user is connected to. * If unknown, address family is AF_UNKNOWN @@ -458,15 +463,6 @@ class CoreExport User : public StreamSocket */ const char *GetCIDRMask(int range); - /** This is true if the user matched an exception (E:Line). It is used to save time on ban checks. - */ - bool exempt; - - /** This value contains how far into the penalty threshold the user is. Once its over - * the penalty threshold then commands are held and processed on-timer. - */ - int Penalty; - /** Default constructor * @throw CoreException if the UID allocated to the user already exists * @param Instance Creator instance @@ -852,7 +848,7 @@ class CoreExport User : public StreamSocket /** Default destructor */ virtual ~User(); - virtual bool cull(); + virtual CullResult cull(); }; /** Derived from Resolver, and performs user forward/reverse lookups.