InspIRCd  4.0
Public Member Functions | Public Attributes | List of all members
ConnectClass Struct Reference

#include <users.h>

Public Member Functions

 ConnectClass (std::shared_ptr< ConfigTag > tag, char type, const std::vector< std::string > &masks)
 
 ConnectClass (std::shared_ptr< ConfigTag > tag, char type, const std::vector< std::string > &masks, std::shared_ptr< ConnectClass > parent)
 
void Update (const std::shared_ptr< ConnectClass > newSettings)
 
const std::string & GetName () const
 
const std::vector< std::string > & GetHosts () const
 
time_t GetRegTimeout ()
 
unsigned long GetPingTime ()
 
unsigned long GetSendqSoftMax ()
 
unsigned long GetSendqHardMax ()
 
unsigned long GetRecvqMax ()
 
unsigned long GetPenaltyThreshold ()
 
unsigned long GetCommandRate ()
 
unsigned long GetMaxLocal ()
 
unsigned long GetMaxGlobal ()
 

Public Attributes

std::shared_ptr< ConfigTagconfig
 
char type
 
bool fakelag = true
 
std::string name
 
unsigned long registration_timeout = 0
 
std::vector< std::string > hosts
 
unsigned long pingtime = 0
 
unsigned long softsendqmax = 0
 
unsigned long hardsendqmax = 0
 
unsigned long recvqmax = 0
 
unsigned long penaltythreshold = 0
 
unsigned long commandrate = 0
 
unsigned long maxlocal = 0
 
unsigned long maxglobal = 0
 
bool maxconnwarn = true
 
unsigned long maxchans = 20
 
unsigned long limit = 0
 
bool resolvehostnames = true
 
insp::flat_set< int > ports
 
std::string password
 
std::string passwordhash
 

Detailed Description

Holds information relevant to <connect allow> and <connect deny> tags in the config file.

Constructor & Destructor Documentation

◆ ConnectClass() [1/2]

ConnectClass::ConnectClass ( std::shared_ptr< ConfigTag tag,
char  type,
const std::vector< std::string > &  masks 
)

Create a new connect class with no settings.

◆ ConnectClass() [2/2]

ConnectClass::ConnectClass ( std::shared_ptr< ConfigTag tag,
char  type,
const std::vector< std::string > &  masks,
std::shared_ptr< ConnectClass parent 
)

Create a new connect class with inherited settings.

Member Function Documentation

◆ GetHosts()

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

Retrieves the hosts for this connect class.

◆ 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 long ConnectClass::GetPenaltyThreshold ( )
inline

Returns the penalty threshold value

◆ GetPingTime()

unsigned long 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 std::shared_ptr< ConnectClass newSettings)

Update the settings in this block to match the given block

Member Data Documentation

◆ commandrate

unsigned long ConnectClass::commandrate = 0

Maximum rate of commands (units: millicommands per second)

◆ fakelag

bool ConnectClass::fakelag = true

True if this class uses fake lag to manage flood, false if it kills

◆ hardsendqmax

unsigned long ConnectClass::hardsendqmax = 0

Maximum size of sendq for users in this class (bytes) Users are killed if they go over this limit

◆ hosts

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

Hosts that this connect class can be used by.

◆ limit

unsigned long ConnectClass::limit = 0

How many users may be in this connect class before they are refused? (0 = no limit = default)

◆ maxchans

unsigned long ConnectClass::maxchans = 20

Max channels for this class

◆ maxconnwarn

bool ConnectClass::maxconnwarn = true

True if max connections for this class is hit and a warning is wanted

◆ maxglobal

unsigned long ConnectClass::maxglobal = 0

Global max when connecting by this connection class

◆ maxlocal

unsigned long ConnectClass::maxlocal = 0

Local max when connecting by this connection class

◆ name

std::string ConnectClass::name

Connect class name

◆ 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 long ConnectClass::penaltythreshold = 0

Seconds worth of penalty before penalty system activates

◆ pingtime

unsigned long ConnectClass::pingtime = 0

Number of seconds between pings for this line

◆ ports

insp::flat_set<int> ConnectClass::ports

If non-empty the server ports which this user has to be using

◆ recvqmax

unsigned long ConnectClass::recvqmax = 0

Maximum size of recvq for users in this class (bytes)

◆ registration_timeout

unsigned long ConnectClass::registration_timeout = 0

Max time to register the connection in seconds

◆ resolvehostnames

bool ConnectClass::resolvehostnames = true

If set to true, no user DNS lookups are to be performed

◆ softsendqmax

unsigned long ConnectClass::softsendqmax = 0

Maximum size of sendq for users in this class (bytes) Users cannot send commands if they go over this limit

◆ type

char ConnectClass::type

Type of line, either CC_ALLOW or CC_DENY


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