DDraceNetwork Documentation
Loading...
Searching...
No Matches
CServerBan Class Reference

#include <server.h>

Inheritance diagram for CServerBan:
[legend]
Collaboration diagram for CServerBan:
[legend]

Public Member Functions

class CServerServer () const
void InitServerBan (class IConsole *pConsole, class IStorage *pStorage, class CServer *pServer)
int BanAddr (const NETADDR *pAddr, int Seconds, const char *pReason, bool VerbatimReason) override
int BanRange (const CNetRange *pRange, int Seconds, const char *pReason) override
Public Member Functions inherited from CNetBan
class IConsoleConsole () const
class IStorageStorage () const
virtual ~CNetBan ()=default
void Init (class IConsole *pConsole, class IStorage *pStorage)
void Update ()
int UnbanByAddr (const NETADDR *pAddr)
int UnbanByRange (const CNetRange *pRange)
int UnbanByIndex (int Index)
void UnbanAll ()
bool IsBanned (const NETADDR *pOrigAddr, char *pBuf, unsigned BufferSize) const

Static Public Member Functions

static void ConBanExt (class IConsole::IResult *pResult, void *pUser)
static void ConBanRegion (class IConsole::IResult *pResult, void *pUser)
static void ConBanRegionRange (class IConsole::IResult *pResult, void *pUser)
Static Public Member Functions inherited from CNetBan
static void ConBan (class IConsole::IResult *pResult, void *pUser)
static void ConBanRange (class IConsole::IResult *pResult, void *pUser)
static void ConUnban (class IConsole::IResult *pResult, void *pUser)
static void ConUnbanRange (class IConsole::IResult *pResult, void *pUser)
static void ConUnbanAll (class IConsole::IResult *pResult, void *pUser)
static void ConBans (class IConsole::IResult *pResult, void *pUser)
static void ConBansFind (class IConsole::IResult *pResult, void *pUser)
static void ConBansSave (class IConsole::IResult *pResult, void *pUser)

Private Member Functions

template<class T>
int BanExt (T *pBanPool, const typename T::CDataType *pData, int Seconds, const char *pReason, bool VerbatimReason)

Private Attributes

class CServerm_pServer

Additional Inherited Members

Public Types inherited from CNetBan
enum  { MSGTYPE_PLAYER = 0 , MSGTYPE_LIST , MSGTYPE_BANADD , MSGTYPE_BANREM }
Protected Types inherited from CNetBan
typedef CBanPool< NETADDR, 1 > CBanAddrPool
typedef CBanPool< CNetRange, 16 > CBanRangePool
typedef CBan< NETADDRCBanAddr
typedef CBan< CNetRangeCBanRange
Protected Member Functions inherited from CNetBan
bool NetMatch (const NETADDR *pAddr1, const NETADDR *pAddr2) const
bool NetMatch (const CNetRange *pRange, const NETADDR *pAddr, int Start, int Length) const
bool NetMatch (const CNetRange *pRange, const NETADDR *pAddr) const
const char * NetToString (const NETADDR *pData, char *pBuffer, unsigned BufferSize) const
const char * NetToString (const CNetRange *pData, char *pBuffer, unsigned BufferSize) const
template<class T>
void MakeBanInfo (const CBan< T > *pBan, char *pBuf, unsigned BuffSize, int Type) const
template<class T>
int Ban (T *pBanPool, const typename T::CDataType *pData, int Seconds, const char *pReason, bool VerbatimReason)
template<class T>
int Unban (T *pBanPool, const typename T::CDataType *pData)
Protected Attributes inherited from CNetBan
class IConsolem_pConsole
class IStoragem_pStorage
CBanAddrPool m_BanAddrPool
CBanRangePool m_BanRangePool
NETADDR m_LocalhostIpV4
NETADDR m_LocalhostIpV6

Member Function Documentation

◆ BanAddr()

int CServerBan::BanAddr ( const NETADDR * pAddr,
int Seconds,
const char * pReason,
bool VerbatimReason )
overridevirtual

Reimplemented from CNetBan.

◆ BanExt()

template<class T>
int CServerBan::BanExt ( T * pBanPool,
const typename T::CDataType * pData,
int Seconds,
const char * pReason,
bool VerbatimReason )
private

◆ BanRange()

int CServerBan::BanRange ( const CNetRange * pRange,
int Seconds,
const char * pReason )
overridevirtual

Reimplemented from CNetBan.

◆ ConBanExt()

void CServerBan::ConBanExt ( class IConsole::IResult * pResult,
void * pUser )
static

◆ ConBanRegion()

void CServerBan::ConBanRegion ( class IConsole::IResult * pResult,
void * pUser )
static

◆ ConBanRegionRange()

void CServerBan::ConBanRegionRange ( class IConsole::IResult * pResult,
void * pUser )
static

◆ InitServerBan()

void CServerBan::InitServerBan ( class IConsole * pConsole,
class IStorage * pStorage,
class CServer * pServer )

◆ Server()

class CServer * CServerBan::Server ( ) const
inline

Member Data Documentation

◆ m_pServer

class CServer* CServerBan::m_pServer
private

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