InspIRCd  3.0
Public Member Functions | Public Attributes | List of all members
ConnectClass Class Reference

#include <users.h>

Inheritance diagram for ConnectClass:
refcountbase

Public Member Functions

 ConnectClass (ConfigTag *tag, char type, const std::string &mask)
 
 ConnectClass (ConfigTag *tag, char type, const std::string &mask, const ConnectClass &parent)
 
void Update (const ConnectClass *newSettings)
 
const std::string & GetName () const
 
const std::string & GetHost () const
 
const std::vector< std::string > & GetHosts () const
 
time_t GetRegTimeout ()
 
unsigned int GetPingTime ()
 
unsigned long GetSendqSoftMax ()
 
unsigned long GetSendqHardMax ()
 
unsigned long GetRecvqMax ()
 
unsigned int GetPenaltyThreshold ()
 
unsigned int GetCommandRate ()
 
unsigned long GetMaxLocal ()
 
unsigned long GetMaxGlobal ()
 
- Public Member Functions inherited from refcountbase
unsigned int GetReferenceCount () const
 
void refcount_inc () const
 
bool refcount_dec () const
 

Public Attributes

reference< ConfigTagconfig
 
std::string host
 
std::vector< std::string > hosts
 
std::string name
 
std::string password
 
std::string passwordhash
 
insp::flat_set< int > ports
 
char type
 
bool fakelag:1
 
bool maxconnwarn:1
 
bool resolvehostnames:1
 
bool uniqueusername:1
 
unsigned int maxchans
 
unsigned int penaltythreshold
 
unsigned int pingtime
 
unsigned int registration_timeout
 
unsigned int commandrate
 
unsigned long hardsendqmax
 
unsigned long limit
 
unsigned long maxglobal
 
unsigned long maxlocal
 
unsigned long recvqmax
 
unsigned long softsendqmax
 

Additional Inherited Members

- Static Public Member Functions inherited from refcountbase
static void * operator new (size_t, void *m)
 
static void * operator new (size_t)
 
static void operator delete (void *)
 

Detailed Description

Represents <connect> class tags from the server config

Constructor & Destructor Documentation

◆ ConnectClass() [1/2]

ConnectClass::ConnectClass ( ConfigTag tag,
char  type,
const std::string &  mask 
)

Creates a new connect class from a config tag

◆ ConnectClass() [2/2]

ConnectClass::ConnectClass ( ConfigTag tag,
char  type,
const std::string &  mask,
const ConnectClass parent 
)

Creates a new connect class with a parent from a config tag.

Member Function Documentation

◆ GetHost()

const std::string& ConnectClass::GetHost ( ) const
inline

Retrieves the hosts that this user can connect from as a string.

◆ GetHosts()

const std::vector<std::string>& ConnectClass::GetHosts ( ) const
inline

Retrieves the hosts that this user can connect from as a vector.

◆ GetMaxGlobal()

unsigned long ConnectClass::GetMaxGlobal ( )
inline

Returns the maximum number of global sessions

◆ GetMaxLocal()

unsigned long ConnectClass::GetMaxLocal ( )
inline

Return the maximum number of local sessions

◆ GetName()

const std::string& ConnectClass::GetName ( ) const
inline

Retrieves the name of this connect class.

◆ GetPenaltyThreshold()

unsigned int ConnectClass::GetPenaltyThreshold ( )
inline

Returns the penalty threshold value

◆ GetPingTime()

unsigned int ConnectClass::GetPingTime ( )
inline

Returns the ping frequency

◆ GetRecvqMax()

unsigned long ConnectClass::GetRecvqMax ( )
inline

Returns the maximum recvq value

◆ GetRegTimeout()

time_t ConnectClass::GetRegTimeout ( )
inline

Returns the registration timeout

◆ GetSendqHardMax()

unsigned long ConnectClass::GetSendqHardMax ( )
inline

Returns the maximum sendq value (hard limit)

◆ GetSendqSoftMax()

unsigned long ConnectClass::GetSendqSoftMax ( )
inline

Returns the maximum sendq value (soft limit) Note that this is in addition to internal OS buffers

◆ Update()

void ConnectClass::Update ( const ConnectClass newSettings)

Update the settings in this block to match the given class

Member Data Documentation

◆ commandrate

unsigned int ConnectClass::commandrate

Maximum rate of commands (units: millicommands per second)

◆ config

reference<ConfigTag> ConnectClass::config

The synthesized (with all inheritance applied) config tag this class was read from.

◆ fakelag

bool ConnectClass::fakelag

Whether fake lag is used by this class.

◆ hardsendqmax

unsigned long ConnectClass::hardsendqmax

The maximum number of bytes that users in this class can have in their send queue before they are disconnected.

◆ host

std::string ConnectClass::host

The hosts that this user can connect from as a string.

◆ hosts

std::vector<std::string> ConnectClass::hosts

The hosts that this user can connect from as a vector.

◆ limit

unsigned long ConnectClass::limit

The maximum number of users in this class that can connect to the local server from one host.

◆ maxchans

unsigned int ConnectClass::maxchans

The maximum number of channels that users in this class can join.

◆ maxconnwarn

bool ConnectClass::maxconnwarn

Whether to warn server operators about the limit for this class being reached.

◆ maxglobal

unsigned long ConnectClass::maxglobal

The maximum number of users in this class that can connect to the entire network from one host.

◆ maxlocal

unsigned long ConnectClass::maxlocal

The maximum number of users that can be in this class on the local server.

◆ name

std::string ConnectClass::name

The name of this connect class.

◆ password

std::string ConnectClass::password

If non-empty then the password a user must specify in PASS to be assigned to this class.

◆ passwordhash

std::string ConnectClass::passwordhash

If non-empty then the hash algorithm that the password field is hashed with.

◆ penaltythreshold

unsigned int ConnectClass::penaltythreshold

The amount of penalty that a user in this class can have before the penalty system activates.

◆ pingtime

unsigned int ConnectClass::pingtime

The number of seconds between keepalive checks for idle clients in this class.

◆ ports

insp::flat_set<int> ConnectClass::ports

If non-empty then the server ports which a user has to be connecting on.

◆ recvqmax

unsigned long ConnectClass::recvqmax

The maximum number of bytes that users in this class can have in their receive queue before they are disconnected.

◆ registration_timeout

unsigned int ConnectClass::registration_timeout

The number of seconds that connecting users have to register within in this class.

◆ resolvehostnames

bool ConnectClass::resolvehostnames

Whether the DNS hostnames of users in this class should be resolved.

◆ softsendqmax

unsigned long ConnectClass::softsendqmax

The maximum number of bytes that users in this class can have in their send queue before their commands stop being processed.

◆ type

char ConnectClass::type

The type of class this.

◆ uniqueusername

bool ConnectClass::uniqueusername

Whether this class is for a shared host where the username (ident) uniquely identifies users.


The documentation for this class was generated from the following files: