DDraceNetwork Docs
CServer Class Reference

#include <server.h>

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

Classes

class  CCache
 
class  CClient
 

Public Types

enum  { MAX_RCONCMD_SEND = 16 }
 
enum  { UNINITIALIZED = 0 , RUNNING = 1 , STOPPING = 2 }
 
enum  { MAP_TYPE_SIX = 0 , MAP_TYPE_SIXUP , NUM_MAP_TYPES }
 
enum  { RECORDER_MANUAL = MAX_CLIENTS , RECORDER_AUTO = MAX_CLIENTS + 1 , NUM_RECORDERS = MAX_CLIENTS + 2 }
 
enum  CONN_LOGGING_CMD { OPEN_SESSION = 1 , CLOSE_SESSION = 2 }
 
- Public Types inherited from IServer
enum  { RCON_CID_SERV = -1 , RCON_CID_VOTE = -2 }
 

Public Member Functions

class IGameServerGameServer ()
 
class CConfigConfig ()
 
const CConfigConfig () const
 
class IConsoleConsole ()
 
class IStorageStorage ()
 
class IEngineAntibotAntibot ()
 
class CDbConnectionPoolDbPool ()
 
IEngineEngine ()
 
 CServer ()
 
 ~CServer ()
 
bool IsClientNameAvailable (int ClientId, const char *pNameRequest)
 
bool SetClientNameImpl (int ClientId, const char *pNameRequest, bool Set)
 
bool SetClientClanImpl (int ClientId, const char *pClanRequest, bool Set)
 
bool WouldClientNameChange (int ClientId, const char *pNameRequest) override
 
bool WouldClientClanChange (int ClientId, const char *pClanRequest) override
 
void SetClientName (int ClientId, const char *pName) override
 
void SetClientClan (int ClientId, const char *pClan) override
 
void SetClientCountry (int ClientId, int Country) override
 
void SetClientScore (int ClientId, std::optional< int > Score) override
 
void SetClientFlags (int ClientId, int Flags) override
 
void Kick (int ClientId, const char *pReason) override
 
void Ban (int ClientId, int Seconds, const char *pReason, bool VerbatimReason) override
 
void RedirectClient (int ClientId, int Port, bool Verbose=false) override
 
void DemoRecorder_HandleAutoStart () override
 
int64_t TickStartTime (int Tick)
 
int Init ()
 
void SendLogLine (const CLogMessage *pMessage)
 
void SetRconCid (int ClientId) override
 
int GetAuthedState (int ClientId) const override
 
const char * GetAuthName (int ClientId) const override
 
void GetMapInfo (char *pMapName, int MapNameSize, int *pMapSize, SHA256_DIGEST *pMapSha256, int *pMapCrc) override
 
bool GetClientInfo (int ClientId, CClientInfo *pInfo) const override
 
void SetClientDDNetVersion (int ClientId, int DDNetVersion) override
 
void GetClientAddr (int ClientId, char *pAddrStr, int Size) const override
 
const char * ClientName (int ClientId) const override
 
const char * ClientClan (int ClientId) const override
 
int ClientCountry (int ClientId) const override
 
bool ClientSlotEmpty (int ClientId) const override
 
bool ClientIngame (int ClientId) const override
 
int Port () const override
 
int MaxClients () const override
 
int ClientCount () const override
 
int DistinctClientCount () const override
 
int GetClientVersion (int ClientId) const override
 
int SendMsg (CMsgPacker *pMsg, int Flags, int ClientId) override
 
void DoSnapshot ()
 
void SendRconType (int ClientId, bool UsernameReq)
 
void SendCapabilities (int ClientId)
 
void SendMap (int ClientId)
 
void SendMapData (int ClientId, int Chunk)
 
void SendMapReload (int ClientId)
 
void SendConnectionReady (int ClientId)
 
void SendRconLine (int ClientId, const char *pLine)
 
void SendRconLogLine (int ClientId, const CLogMessage *pMessage)
 
void SendRconCmdAdd (const IConsole::CCommandInfo *pCommandInfo, int ClientId)
 
void SendRconCmdRem (const IConsole::CCommandInfo *pCommandInfo, int ClientId)
 
int GetConsoleAccessLevel (int ClientId)
 
int NumRconCommands (int ClientId)
 
void UpdateClientRconCommands ()
 
bool CheckReservedSlotAuth (int ClientId, const char *pPassword)
 
void ProcessClientPacket (CNetChunk *pPacket)
 
void FillAntibot (CAntibotRoundData *pData) override
 
void ExpireServerInfo () override
 
void CacheServerInfo (CCache *pCache, int Type, bool SendClients)
 
void CacheServerInfoSixup (CCache *pCache, bool SendClients)
 
void SendServerInfo (const NETADDR *pAddr, int Token, int Type, bool SendClients)
 
void GetServerInfoSixup (CPacker *pPacker, int Token, bool SendClients)
 
bool RateLimitServerInfoConnless ()
 
void SendServerInfoConnless (const NETADDR *pAddr, int Token, int Type)
 
void UpdateRegisterServerInfo ()
 
void UpdateServerInfo (bool Resend=false)
 
void PumpNetwork (bool PacketWaiting)
 
void ChangeMap (const char *pMap) override
 
const char * GetMapName () const override
 
void ReloadMap () override
 
int LoadMap (const char *pMapName)
 
void SaveDemo (int ClientId, float Time) override
 
void StartRecord (int ClientId) override
 
void StopRecord (int ClientId) override
 
bool IsRecording (int ClientId) override
 
void StopDemos () override
 
int Run ()
 
void LogoutClient (int ClientId, const char *pReason)
 
void LogoutKey (int Key, const char *pReason)
 
void ConchainRconPasswordChangeGeneric (int Level, const char *pCurrent, IConsole::IResult *pResult)
 
void RegisterCommands ()
 
int SnapNewId () override
 
void SnapFreeId (int Id) override
 
void * SnapNewItem (int Type, int Id, int Size) override
 
void SnapSetStaticsize (int ItemType, int Size) override
 
void GetClientAddr (int ClientId, NETADDR *pAddr) const override
 
const char * GetAnnouncementLine () override
 
void ReadAnnouncementsFile (const char *pFileName) override
 
int * GetIdMap (int ClientId) override
 
void InitDnsbl (int ClientId)
 
bool DnsblWhite (int ClientId) override
 
bool DnsblPending (int ClientId) override
 
bool DnsblBlack (int ClientId) override
 
void AuthRemoveKey (int KeySlot)
 
bool ClientPrevIngame (int ClientId) override
 
const char * GetNetErrorString (int ClientId) override
 
void ResetNetErrorString (int ClientId) override
 
bool SetTimedOut (int ClientId, int OrigId) override
 
void SetTimeoutProtected (int ClientId) override
 
void SendMsgRaw (int ClientId, const void *pData, int Size, int Flags) override
 
bool ErrorShutdown () const
 
void SetErrorShutdown (const char *pReason) override
 
bool IsSixup (int ClientId) const override
 
void SetLoggers (std::shared_ptr< ILogger > &&pFileLogger, std::shared_ptr< ILogger > &&pStdoutLogger)
 
void SendConnLoggingCommand (CONN_LOGGING_CMD Cmd, const NETADDR *pAddr)
 
- Public Member Functions inherited from IServer
int Tick () const
 
int TickSpeed () const
 
virtual int Port () const =0
 
virtual int MaxClients () const =0
 
virtual int ClientCount () const =0
 
virtual int DistinctClientCount () const =0
 
virtual const char * ClientName (int ClientId) const =0
 
virtual const char * ClientClan (int ClientId) const =0
 
virtual int ClientCountry (int ClientId) const =0
 
virtual bool ClientSlotEmpty (int ClientId) const =0
 
virtual bool ClientIngame (int ClientId) const =0
 
virtual bool GetClientInfo (int ClientId, CClientInfo *pInfo) const =0
 
virtual void SetClientDDNetVersion (int ClientId, int DDNetVersion)=0
 
virtual void GetClientAddr (int ClientId, char *pAddrStr, int Size) const =0
 
virtual int GetClientVersion (int ClientId) const =0
 
virtual int SendMsg (CMsgPacker *pMsg, int Flags, int ClientId)=0
 
template<class T , typename std::enable_if<!protocol7::is_sixup< T >::value, int >::type = 0>
int SendPackMsg (const T *pMsg, int Flags, int ClientId)
 
template<class T , typename std::enable_if< protocol7::is_sixup< T >::value, int >::type = 1>
int SendPackMsg (const T *pMsg, int Flags, int ClientId)
 
template<class T >
int SendPackMsgTranslate (const T *pMsg, int Flags, int ClientId)
 
int SendPackMsgTranslate (const CNetMsg_Sv_Emoticon *pMsg, int Flags, int ClientId)
 
int SendPackMsgTranslate (const CNetMsg_Sv_Chat *pMsg, int Flags, int ClientId)
 
int SendPackMsgTranslate (const CNetMsg_Sv_KillMsg *pMsg, int Flags, int ClientId)
 
int SendPackMsgTranslate (const CNetMsg_Sv_RaceFinish *pMsg, int Flags, int ClientId)
 
template<class T >
int SendPackMsgOne (const T *pMsg, int Flags, int ClientId)
 
bool Translate (int &Target, int Client)
 
bool ReverseTranslate (int &Target, int Client)
 
virtual void GetMapInfo (char *pMapName, int MapNameSize, int *pMapSize, SHA256_DIGEST *pSha256, int *pMapCrc)=0
 
virtual bool WouldClientNameChange (int ClientId, const char *pNameRequest)=0
 
virtual bool WouldClientClanChange (int ClientId, const char *pClanRequest)=0
 
virtual void SetClientName (int ClientId, const char *pName)=0
 
virtual void SetClientClan (int ClientId, const char *pClan)=0
 
virtual void SetClientCountry (int ClientId, int Country)=0
 
virtual void SetClientScore (int ClientId, std::optional< int > Score)=0
 
virtual void SetClientFlags (int ClientId, int Flags)=0
 
virtual int SnapNewId ()=0
 
virtual void SnapFreeId (int Id)=0
 
virtual void * SnapNewItem (int Type, int Id, int Size)=0
 
template<typename T >
T * SnapNewItem (int Id)
 
virtual void SnapSetStaticsize (int ItemType, int Size)=0
 
virtual void SetRconCid (int ClientId)=0
 
virtual int GetAuthedState (int ClientId) const =0
 
virtual const char * GetAuthName (int ClientId) const =0
 
virtual void Kick (int ClientId, const char *pReason)=0
 
virtual void Ban (int ClientId, int Seconds, const char *pReason, bool VerbatimReason)=0
 
virtual void RedirectClient (int ClientId, int Port, bool Verbose=false)=0
 
virtual void ChangeMap (const char *pMap)=0
 
virtual void ReloadMap ()=0
 
virtual void DemoRecorder_HandleAutoStart ()=0
 
virtual void SaveDemo (int ClientId, float Time)=0
 
virtual void StartRecord (int ClientId)=0
 
virtual void StopRecord (int ClientId)=0
 
virtual bool IsRecording (int ClientId)=0
 
virtual void StopDemos ()=0
 
virtual void GetClientAddr (int ClientId, NETADDR *pAddr) const =0
 
virtual int * GetIdMap (int ClientId)=0
 
virtual bool DnsblWhite (int ClientId)=0
 
virtual bool DnsblPending (int ClientId)=0
 
virtual bool DnsblBlack (int ClientId)=0
 
virtual const char * GetAnnouncementLine ()=0
 
virtual void ReadAnnouncementsFile (const char *pFileName)=0
 
virtual bool ClientPrevIngame (int ClientId)=0
 
virtual const char * GetNetErrorString (int ClientId)=0
 
virtual void ResetNetErrorString (int ClientId)=0
 
virtual bool SetTimedOut (int ClientId, int OrigId)=0
 
virtual void SetTimeoutProtected (int ClientId)=0
 
virtual void SetErrorShutdown (const char *pReason)=0
 
virtual void ExpireServerInfo ()=0
 
virtual void FillAntibot (CAntibotRoundData *pData)=0
 
virtual void SendMsgRaw (int ClientId, const void *pData, int Size, int Flags)=0
 
virtual const char * GetMapName () const =0
 
virtual bool IsSixup (int ClientId) const =0
 
- Public Member Functions inherited from IInterface
 IInterface ()
 
virtual void Shutdown ()
 
virtual ~IInterface ()
 

Static Public Member Functions

static int NewClientCallback (int ClientId, void *pUser, bool Sixup)
 
static int NewClientNoAuthCallback (int ClientId, void *pUser)
 
static int DelClientCallback (int ClientId, const char *pReason, void *pUser)
 
static int ClientRejoinCallback (int ClientId, void *pUser)
 
static void ConKick (IConsole::IResult *pResult, void *pUser)
 
static void ConStatus (IConsole::IResult *pResult, void *pUser)
 
static void ConShutdown (IConsole::IResult *pResult, void *pUser)
 
static void ConRecord (IConsole::IResult *pResult, void *pUser)
 
static void ConStopRecord (IConsole::IResult *pResult, void *pUser)
 
static void ConMapReload (IConsole::IResult *pResult, void *pUser)
 
static void ConLogout (IConsole::IResult *pResult, void *pUser)
 
static void ConShowIps (IConsole::IResult *pResult, void *pUser)
 
static void ConAuthAdd (IConsole::IResult *pResult, void *pUser)
 
static void ConAuthAddHashed (IConsole::IResult *pResult, void *pUser)
 
static void ConAuthUpdate (IConsole::IResult *pResult, void *pUser)
 
static void ConAuthUpdateHashed (IConsole::IResult *pResult, void *pUser)
 
static void ConAuthRemove (IConsole::IResult *pResult, void *pUser)
 
static void ConAuthList (IConsole::IResult *pResult, void *pUser)
 
static void ConAddSqlServer (IConsole::IResult *pResult, void *pUserData)
 
static void ConDumpSqlServers (IConsole::IResult *pResult, void *pUserData)
 
static void ConchainSpecialInfoupdate (IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData)
 
static void ConchainMaxclientsperipUpdate (IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData)
 
static void ConchainCommandAccessUpdate (IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData)
 
static void ConchainRconPasswordChange (IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData)
 
static void ConchainRconModPasswordChange (IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData)
 
static void ConchainRconHelperPasswordChange (IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData)
 
static void ConchainMapUpdate (IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData)
 
static void ConchainSixupUpdate (IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData)
 
static void ConchainLoglevel (IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData)
 
static void ConchainStdoutOutputLevel (IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData)
 
static void ConchainAnnouncementFileName (IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData)
 
static void ConchainConnLoggingServerChange (IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData)
 
- Static Public Member Functions inherited from IServer
static const char * InterfaceName ()
 

Public Attributes

CClient m_aClients [MAX_CLIENTS]
 
int m_aIdMap [MAX_CLIENTS *VANILLA_MAX_CLIENTS]
 
CSnapshotDelta m_SnapshotDelta
 
CSnapshotBuilder m_SnapshotBuilder
 
CSnapIdPool m_IdPool
 
CNetServer m_NetServer
 
CEcon m_Econ
 
CFifo m_Fifo
 
CServerBan m_ServerBan
 
CHttp m_Http
 
IEngineMapm_pMap
 
int64_t m_GameStartTime
 
int m_RunServer
 
bool m_MapReload
 
bool m_SameMapReload
 
bool m_ReloadedWhenEmpty
 
int m_RconClientId
 
int m_RconAuthLevel
 
int m_PrintCBIndex
 
char m_aShutdownReason [128]
 
void * m_pPersistentData
 
char m_aCurrentMap [IO_MAX_PATH_LENGTH]
 
const char * m_pCurrentMapName
 
SHA256_DIGEST m_aCurrentMapSha256 [NUM_MAP_TYPES]
 
unsigned m_aCurrentMapCrc [NUM_MAP_TYPES]
 
unsigned char * m_apCurrentMapData [NUM_MAP_TYPES]
 
unsigned int m_aCurrentMapSize [NUM_MAP_TYPES]
 
CDemoRecorder m_aDemoRecorder [NUM_RECORDERS]
 
CAuthManager m_AuthManager
 
int64_t m_ServerInfoFirstRequest
 
int m_ServerInfoNumRequests
 
char m_aErrorShutdownReason [128]
 
CNameBans m_NameBans
 
size_t m_AnnouncementLastLine
 
std::vector< std::string > m_vAnnouncements
 
std::shared_ptr< ILoggerm_pFileLogger = nullptr
 
std::shared_ptr< ILoggerm_pStdoutLogger = nullptr
 
CCache m_aServerInfoCache [3 *2]
 
CCache m_aSixupServerInfoCache [2]
 
bool m_ServerInfoNeedsUpdate
 
int m_aPrevStates [MAX_CLIENTS]
 

Private Attributes

class IGameServerm_pGameServer
 
class CConfigm_pConfig
 
class IConsolem_pConsole
 
class IStoragem_pStorage
 
class IEngineAntibotm_pAntibot
 
class IRegisterm_pRegister
 
IEnginem_pEngine
 
CUPnP m_UPnP
 
UNIXSOCKETADDR m_ConnLoggingDestAddr
 
bool m_ConnLoggingSocketCreated
 
UNIXSOCKET m_ConnLoggingSocket
 
class CDbConnectionPoolm_pConnectionPool
 

Friends

class CServerLogger
 

Additional Inherited Members

- Protected Member Functions inherited from IInterface
IKernelKernel ()
 
- Protected Attributes inherited from IServer
int m_CurrentGameTick
 

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
MAX_RCONCMD_SEND 

◆ anonymous enum

anonymous enum
Enumerator
UNINITIALIZED 
RUNNING 
STOPPING 

◆ anonymous enum

anonymous enum
Enumerator
MAP_TYPE_SIX 
MAP_TYPE_SIXUP 
NUM_MAP_TYPES 

◆ anonymous enum

anonymous enum
Enumerator
RECORDER_MANUAL 
RECORDER_AUTO 
NUM_RECORDERS 

◆ CONN_LOGGING_CMD

Enumerator
OPEN_SESSION 
CLOSE_SESSION 

Constructor & Destructor Documentation

◆ CServer()

CServer::CServer ( )

◆ ~CServer()

CServer::~CServer ( )

Member Function Documentation

◆ Antibot()

class IEngineAntibot * CServer::Antibot ( )
inline

◆ AuthRemoveKey()

void CServer::AuthRemoveKey ( int  KeySlot)

◆ Ban()

void CServer::Ban ( int  ClientId,
int  Seconds,
const char *  pReason,
bool  VerbatimReason 
)
overridevirtual

Implements IServer.

◆ CacheServerInfo()

void CServer::CacheServerInfo ( CCache pCache,
int  Type,
bool  SendClients 
)

◆ CacheServerInfoSixup()

void CServer::CacheServerInfoSixup ( CCache pCache,
bool  SendClients 
)

◆ ChangeMap()

void CServer::ChangeMap ( const char *  pMap)
overridevirtual

Implements IServer.

◆ CheckReservedSlotAuth()

bool CServer::CheckReservedSlotAuth ( int  ClientId,
const char *  pPassword 
)

◆ ClientClan()

const char * CServer::ClientClan ( int  ClientId) const
overridevirtual

Implements IServer.

◆ ClientCount()

int CServer::ClientCount ( ) const
overridevirtual

Implements IServer.

◆ ClientCountry()

int CServer::ClientCountry ( int  ClientId) const
overridevirtual

Implements IServer.

◆ ClientIngame()

bool CServer::ClientIngame ( int  ClientId) const
overridevirtual

Implements IServer.

◆ ClientName()

const char * CServer::ClientName ( int  ClientId) const
overridevirtual

Implements IServer.

◆ ClientPrevIngame()

bool CServer::ClientPrevIngame ( int  ClientId)
inlineoverridevirtual

Implements IServer.

◆ ClientRejoinCallback()

int CServer::ClientRejoinCallback ( int  ClientId,
void *  pUser 
)
static

◆ ClientSlotEmpty()

bool CServer::ClientSlotEmpty ( int  ClientId) const
overridevirtual

Implements IServer.

◆ ConAddSqlServer()

void CServer::ConAddSqlServer ( IConsole::IResult pResult,
void *  pUserData 
)
static

◆ ConAuthAdd()

void CServer::ConAuthAdd ( IConsole::IResult pResult,
void *  pUser 
)
static

◆ ConAuthAddHashed()

void CServer::ConAuthAddHashed ( IConsole::IResult pResult,
void *  pUser 
)
static

◆ ConAuthList()

void CServer::ConAuthList ( IConsole::IResult pResult,
void *  pUser 
)
static

◆ ConAuthRemove()

void CServer::ConAuthRemove ( IConsole::IResult pResult,
void *  pUser 
)
static

◆ ConAuthUpdate()

void CServer::ConAuthUpdate ( IConsole::IResult pResult,
void *  pUser 
)
static

◆ ConAuthUpdateHashed()

void CServer::ConAuthUpdateHashed ( IConsole::IResult pResult,
void *  pUser 
)
static

◆ ConchainAnnouncementFileName()

void CServer::ConchainAnnouncementFileName ( IConsole::IResult pResult,
void *  pUserData,
IConsole::FCommandCallback  pfnCallback,
void *  pCallbackUserData 
)
static

◆ ConchainCommandAccessUpdate()

void CServer::ConchainCommandAccessUpdate ( IConsole::IResult pResult,
void *  pUserData,
IConsole::FCommandCallback  pfnCallback,
void *  pCallbackUserData 
)
static

◆ ConchainConnLoggingServerChange()

void CServer::ConchainConnLoggingServerChange ( IConsole::IResult pResult,
void *  pUserData,
IConsole::FCommandCallback  pfnCallback,
void *  pCallbackUserData 
)
static

◆ ConchainLoglevel()

void CServer::ConchainLoglevel ( IConsole::IResult pResult,
void *  pUserData,
IConsole::FCommandCallback  pfnCallback,
void *  pCallbackUserData 
)
static

◆ ConchainMapUpdate()

void CServer::ConchainMapUpdate ( IConsole::IResult pResult,
void *  pUserData,
IConsole::FCommandCallback  pfnCallback,
void *  pCallbackUserData 
)
static

◆ ConchainMaxclientsperipUpdate()

void CServer::ConchainMaxclientsperipUpdate ( IConsole::IResult pResult,
void *  pUserData,
IConsole::FCommandCallback  pfnCallback,
void *  pCallbackUserData 
)
static

◆ ConchainRconHelperPasswordChange()

void CServer::ConchainRconHelperPasswordChange ( IConsole::IResult pResult,
void *  pUserData,
IConsole::FCommandCallback  pfnCallback,
void *  pCallbackUserData 
)
static

◆ ConchainRconModPasswordChange()

void CServer::ConchainRconModPasswordChange ( IConsole::IResult pResult,
void *  pUserData,
IConsole::FCommandCallback  pfnCallback,
void *  pCallbackUserData 
)
static

◆ ConchainRconPasswordChange()

void CServer::ConchainRconPasswordChange ( IConsole::IResult pResult,
void *  pUserData,
IConsole::FCommandCallback  pfnCallback,
void *  pCallbackUserData 
)
static

◆ ConchainRconPasswordChangeGeneric()

void CServer::ConchainRconPasswordChangeGeneric ( int  Level,
const char *  pCurrent,
IConsole::IResult pResult 
)

◆ ConchainSixupUpdate()

void CServer::ConchainSixupUpdate ( IConsole::IResult pResult,
void *  pUserData,
IConsole::FCommandCallback  pfnCallback,
void *  pCallbackUserData 
)
static

◆ ConchainSpecialInfoupdate()

void CServer::ConchainSpecialInfoupdate ( IConsole::IResult pResult,
void *  pUserData,
IConsole::FCommandCallback  pfnCallback,
void *  pCallbackUserData 
)
static

◆ ConchainStdoutOutputLevel()

void CServer::ConchainStdoutOutputLevel ( IConsole::IResult pResult,
void *  pUserData,
IConsole::FCommandCallback  pfnCallback,
void *  pCallbackUserData 
)
static

◆ ConDumpSqlServers()

void CServer::ConDumpSqlServers ( IConsole::IResult pResult,
void *  pUserData 
)
static

◆ Config() [1/2]

class CConfig * CServer::Config ( )
inline

◆ Config() [2/2]

const CConfig * CServer::Config ( ) const
inline

◆ ConKick()

void CServer::ConKick ( IConsole::IResult pResult,
void *  pUser 
)
static

◆ ConLogout()

void CServer::ConLogout ( IConsole::IResult pResult,
void *  pUser 
)
static

◆ ConMapReload()

void CServer::ConMapReload ( IConsole::IResult pResult,
void *  pUser 
)
static

◆ ConRecord()

void CServer::ConRecord ( IConsole::IResult pResult,
void *  pUser 
)
static

◆ ConShowIps()

void CServer::ConShowIps ( IConsole::IResult pResult,
void *  pUser 
)
static

◆ ConShutdown()

void CServer::ConShutdown ( IConsole::IResult pResult,
void *  pUser 
)
static

◆ Console()

class IConsole * CServer::Console ( )
inline

◆ ConStatus()

void CServer::ConStatus ( IConsole::IResult pResult,
void *  pUser 
)
static

◆ ConStopRecord()

void CServer::ConStopRecord ( IConsole::IResult pResult,
void *  pUser 
)
static

◆ DbPool()

class CDbConnectionPool * CServer::DbPool ( )
inline

◆ DelClientCallback()

int CServer::DelClientCallback ( int  ClientId,
const char *  pReason,
void *  pUser 
)
static

◆ DemoRecorder_HandleAutoStart()

void CServer::DemoRecorder_HandleAutoStart ( )
overridevirtual

Implements IServer.

◆ DistinctClientCount()

int CServer::DistinctClientCount ( ) const
overridevirtual

Implements IServer.

◆ DnsblBlack()

bool CServer::DnsblBlack ( int  ClientId)
inlineoverridevirtual

Implements IServer.

◆ DnsblPending()

bool CServer::DnsblPending ( int  ClientId)
inlineoverridevirtual

Implements IServer.

◆ DnsblWhite()

bool CServer::DnsblWhite ( int  ClientId)
inlineoverridevirtual

Implements IServer.

◆ DoSnapshot()

void CServer::DoSnapshot ( )

◆ Engine()

IEngine * CServer::Engine ( )
inline

◆ ErrorShutdown()

bool CServer::ErrorShutdown ( ) const
inline

◆ ExpireServerInfo()

void CServer::ExpireServerInfo ( )
overridevirtual

Implements IServer.

◆ FillAntibot()

void CServer::FillAntibot ( CAntibotRoundData pData)
overridevirtual

Implements IServer.

◆ GameServer()

class IGameServer * CServer::GameServer ( )
inline

◆ GetAnnouncementLine()

const char * CServer::GetAnnouncementLine ( )
overridevirtual

Implements IServer.

◆ GetAuthedState()

int CServer::GetAuthedState ( int  ClientId) const
overridevirtual

Implements IServer.

◆ GetAuthName()

const char * CServer::GetAuthName ( int  ClientId) const
overridevirtual

Implements IServer.

◆ GetClientAddr() [1/2]

void CServer::GetClientAddr ( int  ClientId,
char *  pAddrStr,
int  Size 
) const
overridevirtual

Implements IServer.

◆ GetClientAddr() [2/2]

void CServer::GetClientAddr ( int  ClientId,
NETADDR pAddr 
) const
overridevirtual

Implements IServer.

◆ GetClientInfo()

bool CServer::GetClientInfo ( int  ClientId,
CClientInfo pInfo 
) const
overridevirtual

Implements IServer.

◆ GetClientVersion()

int CServer::GetClientVersion ( int  ClientId) const
overridevirtual

Returns the version of the client with the given client ID.

Parameters
ClientIdthe client Id, which must be between 0 and MAX_CLIENTS - 1, or equal to SERVER_DEMO_CLIENT for server demos.
Returns
The version of the client with the given client ID. For server demos this is always the latest client version. On errors, VERSION_NONE is returned.

Implements IServer.

◆ GetConsoleAccessLevel()

int CServer::GetConsoleAccessLevel ( int  ClientId)

◆ GetIdMap()

int * CServer::GetIdMap ( int  ClientId)
overridevirtual

Implements IServer.

◆ GetMapInfo()

void CServer::GetMapInfo ( char *  pMapName,
int  MapNameSize,
int *  pMapSize,
SHA256_DIGEST pMapSha256,
int *  pMapCrc 
)
overridevirtual

Implements IServer.

◆ GetMapName()

const char * CServer::GetMapName ( ) const
overridevirtual

Implements IServer.

◆ GetNetErrorString()

const char * CServer::GetNetErrorString ( int  ClientId)
inlineoverridevirtual

Implements IServer.

◆ GetServerInfoSixup()

void CServer::GetServerInfoSixup ( CPacker pPacker,
int  Token,
bool  SendClients 
)

◆ Init()

int CServer::Init ( )

◆ InitDnsbl()

void CServer::InitDnsbl ( int  ClientId)

◆ IsClientNameAvailable()

bool CServer::IsClientNameAvailable ( int  ClientId,
const char *  pNameRequest 
)

◆ IsRecording()

bool CServer::IsRecording ( int  ClientId)
overridevirtual

Implements IServer.

◆ IsSixup()

bool CServer::IsSixup ( int  ClientId) const
inlineoverridevirtual

Implements IServer.

◆ Kick()

void CServer::Kick ( int  ClientId,
const char *  pReason 
)
overridevirtual

Implements IServer.

◆ LoadMap()

int CServer::LoadMap ( const char *  pMapName)

◆ LogoutClient()

void CServer::LogoutClient ( int  ClientId,
const char *  pReason 
)

◆ LogoutKey()

void CServer::LogoutKey ( int  Key,
const char *  pReason 
)

◆ MaxClients()

int CServer::MaxClients ( ) const
overridevirtual

Implements IServer.

◆ NewClientCallback()

int CServer::NewClientCallback ( int  ClientId,
void *  pUser,
bool  Sixup 
)
static

◆ NewClientNoAuthCallback()

int CServer::NewClientNoAuthCallback ( int  ClientId,
void *  pUser 
)
static

◆ NumRconCommands()

int CServer::NumRconCommands ( int  ClientId)

◆ Port()

int CServer::Port ( ) const
overridevirtual

Implements IServer.

◆ ProcessClientPacket()

void CServer::ProcessClientPacket ( CNetChunk pPacket)

◆ PumpNetwork()

void CServer::PumpNetwork ( bool  PacketWaiting)

◆ RateLimitServerInfoConnless()

bool CServer::RateLimitServerInfoConnless ( )

◆ ReadAnnouncementsFile()

void CServer::ReadAnnouncementsFile ( const char *  pFileName)
overridevirtual

Implements IServer.

◆ RedirectClient()

void CServer::RedirectClient ( int  ClientId,
int  Port,
bool  Verbose = false 
)
overridevirtual

Implements IServer.

◆ RegisterCommands()

void CServer::RegisterCommands ( )

◆ ReloadMap()

void CServer::ReloadMap ( )
overridevirtual

Implements IServer.

◆ ResetNetErrorString()

void CServer::ResetNetErrorString ( int  ClientId)
inlineoverridevirtual

Implements IServer.

◆ Run()

int CServer::Run ( )

◆ SaveDemo()

void CServer::SaveDemo ( int  ClientId,
float  Time 
)
overridevirtual

Implements IServer.

◆ SendCapabilities()

void CServer::SendCapabilities ( int  ClientId)

◆ SendConnectionReady()

void CServer::SendConnectionReady ( int  ClientId)

◆ SendConnLoggingCommand()

void CServer::SendConnLoggingCommand ( CONN_LOGGING_CMD  Cmd,
const NETADDR pAddr 
)

◆ SendLogLine()

void CServer::SendLogLine ( const CLogMessage pMessage)

◆ SendMap()

void CServer::SendMap ( int  ClientId)

◆ SendMapData()

void CServer::SendMapData ( int  ClientId,
int  Chunk 
)

◆ SendMapReload()

void CServer::SendMapReload ( int  ClientId)

◆ SendMsg()

int CServer::SendMsg ( CMsgPacker pMsg,
int  Flags,
int  ClientId 
)
overridevirtual

Implements IServer.

◆ SendMsgRaw()

void CServer::SendMsgRaw ( int  ClientId,
const void *  pData,
int  Size,
int  Flags 
)
overridevirtual

Implements IServer.

◆ SendRconCmdAdd()

void CServer::SendRconCmdAdd ( const IConsole::CCommandInfo pCommandInfo,
int  ClientId 
)

◆ SendRconCmdRem()

void CServer::SendRconCmdRem ( const IConsole::CCommandInfo pCommandInfo,
int  ClientId 
)

◆ SendRconLine()

void CServer::SendRconLine ( int  ClientId,
const char *  pLine 
)

◆ SendRconLogLine()

void CServer::SendRconLogLine ( int  ClientId,
const CLogMessage pMessage 
)

◆ SendRconType()

void CServer::SendRconType ( int  ClientId,
bool  UsernameReq 
)

◆ SendServerInfo()

void CServer::SendServerInfo ( const NETADDR pAddr,
int  Token,
int  Type,
bool  SendClients 
)

◆ SendServerInfoConnless()

void CServer::SendServerInfoConnless ( const NETADDR pAddr,
int  Token,
int  Type 
)

◆ SetClientClan()

void CServer::SetClientClan ( int  ClientId,
const char *  pClan 
)
overridevirtual

Implements IServer.

◆ SetClientClanImpl()

bool CServer::SetClientClanImpl ( int  ClientId,
const char *  pClanRequest,
bool  Set 
)

◆ SetClientCountry()

void CServer::SetClientCountry ( int  ClientId,
int  Country 
)
overridevirtual

Implements IServer.

◆ SetClientDDNetVersion()

void CServer::SetClientDDNetVersion ( int  ClientId,
int  DDNetVersion 
)
overridevirtual

Implements IServer.

◆ SetClientFlags()

void CServer::SetClientFlags ( int  ClientId,
int  Flags 
)
overridevirtual

Implements IServer.

◆ SetClientName()

void CServer::SetClientName ( int  ClientId,
const char *  pName 
)
overridevirtual

Implements IServer.

◆ SetClientNameImpl()

bool CServer::SetClientNameImpl ( int  ClientId,
const char *  pNameRequest,
bool  Set 
)

◆ SetClientScore()

void CServer::SetClientScore ( int  ClientId,
std::optional< int >  Score 
)
overridevirtual

Implements IServer.

◆ SetErrorShutdown()

void CServer::SetErrorShutdown ( const char *  pReason)
overridevirtual

Implements IServer.

◆ SetLoggers()

void CServer::SetLoggers ( std::shared_ptr< ILogger > &&  pFileLogger,
std::shared_ptr< ILogger > &&  pStdoutLogger 
)

◆ SetRconCid()

void CServer::SetRconCid ( int  ClientId)
overridevirtual

Implements IServer.

◆ SetTimedOut()

bool CServer::SetTimedOut ( int  ClientId,
int  OrigId 
)
overridevirtual

Implements IServer.

◆ SetTimeoutProtected()

void CServer::SetTimeoutProtected ( int  ClientId)
inlineoverridevirtual

Implements IServer.

◆ SnapFreeId()

void CServer::SnapFreeId ( int  Id)
overridevirtual

Implements IServer.

◆ SnapNewId()

int CServer::SnapNewId ( )
overridevirtual

Implements IServer.

◆ SnapNewItem()

void * CServer::SnapNewItem ( int  Type,
int  Id,
int  Size 
)
overridevirtual

Implements IServer.

◆ SnapSetStaticsize()

void CServer::SnapSetStaticsize ( int  ItemType,
int  Size 
)
overridevirtual

Implements IServer.

◆ StartRecord()

void CServer::StartRecord ( int  ClientId)
overridevirtual

Implements IServer.

◆ StopDemos()

void CServer::StopDemos ( )
overridevirtual

Implements IServer.

◆ StopRecord()

void CServer::StopRecord ( int  ClientId)
overridevirtual

Implements IServer.

◆ Storage()

class IStorage * CServer::Storage ( )
inline

◆ TickStartTime()

int64_t CServer::TickStartTime ( int  Tick)

◆ UpdateClientRconCommands()

void CServer::UpdateClientRconCommands ( )

◆ UpdateRegisterServerInfo()

void CServer::UpdateRegisterServerInfo ( )

◆ UpdateServerInfo()

void CServer::UpdateServerInfo ( bool  Resend = false)

◆ WouldClientClanChange()

bool CServer::WouldClientClanChange ( int  ClientId,
const char *  pClanRequest 
)
overridevirtual

Implements IServer.

◆ WouldClientNameChange()

bool CServer::WouldClientNameChange ( int  ClientId,
const char *  pNameRequest 
)
overridevirtual

Implements IServer.

Friends And Related Function Documentation

◆ CServerLogger

friend class CServerLogger
friend

Member Data Documentation

◆ m_aClients

CClient CServer::m_aClients[MAX_CLIENTS]

◆ m_aCurrentMap

char CServer::m_aCurrentMap[IO_MAX_PATH_LENGTH]

◆ m_aCurrentMapCrc

unsigned CServer::m_aCurrentMapCrc[NUM_MAP_TYPES]

◆ m_aCurrentMapSha256

SHA256_DIGEST CServer::m_aCurrentMapSha256[NUM_MAP_TYPES]

◆ m_aCurrentMapSize

unsigned int CServer::m_aCurrentMapSize[NUM_MAP_TYPES]

◆ m_aDemoRecorder

CDemoRecorder CServer::m_aDemoRecorder[NUM_RECORDERS]

◆ m_aErrorShutdownReason

char CServer::m_aErrorShutdownReason[128]

◆ m_aIdMap

int CServer::m_aIdMap[MAX_CLIENTS *VANILLA_MAX_CLIENTS]

◆ m_AnnouncementLastLine

size_t CServer::m_AnnouncementLastLine

◆ m_apCurrentMapData

unsigned char* CServer::m_apCurrentMapData[NUM_MAP_TYPES]

◆ m_aPrevStates

int CServer::m_aPrevStates[MAX_CLIENTS]

◆ m_aServerInfoCache

CCache CServer::m_aServerInfoCache[3 *2]

◆ m_aShutdownReason

char CServer::m_aShutdownReason[128]

◆ m_aSixupServerInfoCache

CCache CServer::m_aSixupServerInfoCache[2]

◆ m_AuthManager

CAuthManager CServer::m_AuthManager

◆ m_ConnLoggingDestAddr

UNIXSOCKETADDR CServer::m_ConnLoggingDestAddr
private

◆ m_ConnLoggingSocket

UNIXSOCKET CServer::m_ConnLoggingSocket
private

◆ m_ConnLoggingSocketCreated

bool CServer::m_ConnLoggingSocketCreated
private

◆ m_Econ

CEcon CServer::m_Econ

◆ m_Fifo

CFifo CServer::m_Fifo

◆ m_GameStartTime

int64_t CServer::m_GameStartTime

◆ m_Http

CHttp CServer::m_Http

◆ m_IdPool

CSnapIdPool CServer::m_IdPool

◆ m_MapReload

bool CServer::m_MapReload

◆ m_NameBans

CNameBans CServer::m_NameBans

◆ m_NetServer

CNetServer CServer::m_NetServer

◆ m_pAntibot

class IEngineAntibot* CServer::m_pAntibot
private

◆ m_pConfig

class CConfig* CServer::m_pConfig
private

◆ m_pConnectionPool

class CDbConnectionPool* CServer::m_pConnectionPool
private

◆ m_pConsole

class IConsole* CServer::m_pConsole
private

◆ m_pCurrentMapName

const char* CServer::m_pCurrentMapName

◆ m_pEngine

IEngine* CServer::m_pEngine
private

◆ m_pFileLogger

std::shared_ptr<ILogger> CServer::m_pFileLogger = nullptr

◆ m_pGameServer

class IGameServer* CServer::m_pGameServer
private

◆ m_pMap

IEngineMap* CServer::m_pMap

◆ m_pPersistentData

void* CServer::m_pPersistentData

◆ m_pRegister

class IRegister* CServer::m_pRegister
private

◆ m_PrintCBIndex

int CServer::m_PrintCBIndex

◆ m_pStdoutLogger

std::shared_ptr<ILogger> CServer::m_pStdoutLogger = nullptr

◆ m_pStorage

class IStorage* CServer::m_pStorage
private

◆ m_RconAuthLevel

int CServer::m_RconAuthLevel

◆ m_RconClientId

int CServer::m_RconClientId

◆ m_ReloadedWhenEmpty

bool CServer::m_ReloadedWhenEmpty

◆ m_RunServer

int CServer::m_RunServer

◆ m_SameMapReload

bool CServer::m_SameMapReload

◆ m_ServerBan

CServerBan CServer::m_ServerBan

◆ m_ServerInfoFirstRequest

int64_t CServer::m_ServerInfoFirstRequest

◆ m_ServerInfoNeedsUpdate

bool CServer::m_ServerInfoNeedsUpdate

◆ m_ServerInfoNumRequests

int CServer::m_ServerInfoNumRequests

◆ m_SnapshotBuilder

CSnapshotBuilder CServer::m_SnapshotBuilder

◆ m_SnapshotDelta

CSnapshotDelta CServer::m_SnapshotDelta

◆ m_UPnP

CUPnP CServer::m_UPnP
private

◆ m_vAnnouncements

std::vector<std::string> CServer::m_vAnnouncements

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