InspIRCd  2.0
 All Classes Namespaces Functions Variables Typedefs Enumerations
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::ConnectClass ( ConfigTag tag,
char  type,
const std::string &  mask 
)

Create a new connect class with no settings.

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

Create a new connect class with inherited settings.

Member Function Documentation

unsigned long ConnectClass::GetMaxGlobal ( )
inline

Returns the maximum number of global sessions

unsigned long ConnectClass::GetMaxLocal ( )
inline

Return the maximum number of local sessions

unsigned int ConnectClass::GetPenaltyThreshold ( )
inline

Returns the penalty threshold value

unsigned int ConnectClass::GetPingTime ( )
inline

Returns the ping frequency

unsigned long ConnectClass::GetRecvqMax ( )
inline

Returns the maximum recvq value

time_t ConnectClass::GetRegTimeout ( )
inline

Returns the registration timeout

unsigned long ConnectClass::GetSendqHardMax ( )
inline

Returns the maximum sendq value (hard limit)

unsigned long ConnectClass::GetSendqSoftMax ( )
inline

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

void ConnectClass::Update ( const ConnectClass newSettings)

Update the settings in this block to match the given block

Member Data Documentation

unsigned int ConnectClass::commandrate

Maximum rate of commands (units: millicommands per second)

bool ConnectClass::fakelag

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

unsigned long ConnectClass::hardsendqmax

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

std::string ConnectClass::host

Host mask for this line

unsigned long ConnectClass::limit

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

unsigned int ConnectClass::maxchans

Max channels for this class

bool ConnectClass::maxconnwarn

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

unsigned long ConnectClass::maxglobal

Global max when connecting by this connection class

unsigned long ConnectClass::maxlocal

Local max when connecting by this connection class

std::string ConnectClass::name

Connect class name

unsigned int ConnectClass::penaltythreshold

Seconds worth of penalty before penalty system activates

unsigned int ConnectClass::pingtime

Number of seconds between pings for this line

unsigned long ConnectClass::recvqmax

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

unsigned int ConnectClass::registration_timeout

Max time to register the connection in seconds

unsigned long ConnectClass::softsendqmax

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

char ConnectClass::type

Type of line, either CC_ALLOW or CC_DENY


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