InspIRCd  2.0
Public Member Functions | Public Attributes | List of all members
ConnectClass Struct 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 std::string & GetHost ()
 
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
 
char type
 
bool fakelag
 
std::string name
 
unsigned int registration_timeout
 
std::string host
 
unsigned int pingtime
 
unsigned long softsendqmax
 
unsigned long hardsendqmax
 
unsigned long recvqmax
 
unsigned int penaltythreshold
 
unsigned int commandrate
 
unsigned long maxlocal
 
unsigned long maxglobal
 
bool maxconnwarn
 
unsigned int maxchans
 
unsigned long limit
 

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

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

Constructor & Destructor Documentation

◆ ConnectClass() [1/2]

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

Create a new connect class with no settings.

◆ ConnectClass() [2/2]

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

Create a new connect class with inherited settings.

Member Function Documentation

◆ 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

◆ 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 block

Member Data Documentation

◆ commandrate

unsigned int ConnectClass::commandrate

Maximum rate of commands (units: millicommands per second)

◆ fakelag

bool ConnectClass::fakelag

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

◆ hardsendqmax

unsigned long ConnectClass::hardsendqmax

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

◆ host

std::string ConnectClass::host

Host mask for this line

◆ limit

unsigned long ConnectClass::limit

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

◆ maxchans

unsigned int ConnectClass::maxchans

Max channels for this class

◆ maxconnwarn

bool ConnectClass::maxconnwarn

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

◆ maxglobal

unsigned long ConnectClass::maxglobal

Global max when connecting by this connection class

◆ maxlocal

unsigned long ConnectClass::maxlocal

Local max when connecting by this connection class

◆ name

std::string ConnectClass::name

Connect class name

◆ penaltythreshold

unsigned int ConnectClass::penaltythreshold

Seconds worth of penalty before penalty system activates

◆ pingtime

unsigned int ConnectClass::pingtime

Number of seconds between pings for this line

◆ recvqmax

unsigned long ConnectClass::recvqmax

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

◆ registration_timeout

unsigned int ConnectClass::registration_timeout

Max time to register the connection in seconds

◆ softsendqmax

unsigned long ConnectClass::softsendqmax

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: