FTEQW
Documentation of the FTE engine source tree.
sv_main.c File Reference

Typedefs

typedef struct pinnedmessages_s pinnedmessages_t
 

Functions

void CvarPostfixKMG (cvar_t *v, char *oldval)
 
void PRH2_SetPlayerClass (client_t *cl, int classnum, qboolean fromqc)
 
void SV_DeDupeName (const char *val, client_t *cl, char *newname, size_t newnamesize)
 
qboolean ServerPaused (void)
 
void SV_Shutdown (void)
 
void VARGS SV_Error (char *error,...)
 
void VARGS Host_Error (const char *error,...)
 
void VARGS Host_EndGame (const char *error,...)
 
void SV_FinalMessage (char *message)
 
void SV_DropClient (client_t *drop)
 
void PIN_DeleteOldestMessage (void)
 
void PIN_MakeMessage (char *from, char *msg)
 
void PIN_LoadMessages (void)
 
void PIN_SaveMessages (void)
 
void PIN_ShowMessages (client_t *cl)
 
int SV_CalcPing (client_t *cl, qboolean forcecalc)
 
void SV_FullClientUpdate (client_t *client, client_t *to)
 
const char * SV_ProtocolNameForClient (client_t *cl)
 
char * SV_PlayerPublicAddress (client_t *cl)
 
const char * SV_GetProtocolVersionString (void)
 
void SVC_Ping (void)
 
int SV_NewChallenge (void)
 
qboolean SVC_GetChallenge (qboolean respond_dp)
 
qboolean SV_ChallengePasses (int challenge)
 
void VARGS SV_RejectMessage (enum serverprotocols_e protocol, char *format,...)
 
void SV_AcceptMessage (client_t *newcl)
 
void SV_ClientProtocolExtensionsChanged (client_t *client)
 
client_tSV_AddSplit (client_t *controller, char *info, int id)
 
void SV_DoDirectConnect (svconnectinfo_t *fte_restrict info)
 
void SVC_DirectConnect (int expectedreliablesequence)
 
void SVC_RemoteCommand (void)
 
void SVC_RealIP (void)
 
void SVC_ACK (void)
 
void SVC_ICE_Offer (void)
 
void SVC_ICE_Candidate (void)
 
qboolean SVC_ThrottleInfo (void)
 
qboolean SV_ConnectionlessPacket (void)
 
qboolean SVNQ_ConnectionlessPacket (void)
 
void SV_OpenRoute_f (void)
 
void SV_ReadPacket (void)
 
void SV_KillExpiredBans (void)
 
qboolean SV_GetPacket (void)
 
qboolean SV_ReadPackets (float *delay)
 
void SV_CheckTimeouts (void)
 
qboolean QCExternalDebuggerCommand (char *text)
 
void SV_GetConsoleCommands (void)
 
int SV_RateForClient (client_t *cl)
 
void SV_CheckVars (void)
 
void SVQ2_ClearEvents (void)
 
void SV_Impulse_f (void)
 
float SV_Frame (void)
 
void Log_Init (void)
 
void SV_InitLocal (void)
 
void SV_FixupName (const char *in, char *out, unsigned int outlen)
 
qboolean ReloadRanking (client_t *cl, const char *newname)
 
void SV_ExtractFromUserinfo (client_t *cl, qboolean verbose)
 
void SV_InitNet (void)
 
void SV_Demo_Init (void)
 
void SV_ArgumentOverrides (void)
 
void SV_ExecInitialConfigs (char *defaultexec)
 
void SV_Init (quakeparms_t *parms)
 

Variables

client_thost_client
 
cvar_t sv_mintic = CVARD("sv_mintic","0.013", "The minimum interval between running physics frames.")
 
cvar_t sv_maxtic = CVARD("sv_maxtic","0.1", "The maximum interval between running physics frames. If the value is too low, multiple physics interations might be run at a time (based upon sv_limittics). Set to 0 for fixed-interval ticks, which may be required if ODE is used.")
 
cvar_t sv_limittics = CVARD("sv_limittics","3", "The maximum number of ticks that may be run within a frame, to allow the server to catch up if it stalled or if sv_maxtic is too low.")
 
cvar_t sv_nailhack = CVARD("sv_nailhack","1", "If set to 1, disables the nail entity networking optimisation. This hack was popularised by qizmo which recommends it for better compression. Also allows clients to interplate nail positions and add trails.")
 
cvar_t sv_nopvs = CVARD("sv_nopvs", "0", "Set to 1 to ignore pvs on the server. This can make wallhacks more dangerous, so should only be used for debugging.")
 
cvar_t fraglog_public = CVARD("fraglog_public", "1", "Enables support for connectionless fraglog requests")
 
cvar_t fraglog_details = CVARD("fraglog_details", "1", "Bitmask\n1: killer+killee names.\n2: killer+killee teams\n4:timestamp.\n8:killer weapon\n16:killer+killee guid.\nFor compatibility, use 1(vanilla) or 7(mvdsv).")
 
cvar_t zombietime = CVARD("zombietime", "2", "Client slots will not be reused for this number of seconds.")
 
cvar_t sv_rconlim = CVARFD("sv_rconlim", "4", CVAR_ARCHIVE, "Blocks repeated (invalid) rcon attempts.")
 
cvar_t sv_crypt_rcon = CVARFD("sv_crypt_rcon", "", CVAR_ARCHIVE, "Controls whether the rcon password must be hashed or not. Hashed passwords also partially prevent replay attacks, but does NOT prevent malicious actors from reading the commands/results.\n0: completely insecure. ONLY allows plain-text passwords. Do not use.\n1: Mandatory hashing (recommended).\nEmpty: Allow either, whether the password is secure or not is purely the client's responsibility/fault. Only use this for comptibility with old clients.")
 
cvar_t sv_crypt_rcon_clockskew = CVARFD("sv_timestamplen", "60", CVAR_ARCHIVE, "Limits clock skew to reduce (delayed) replay attacks")
 
cvar_t rcon_password = CVARF("rcon_password", "", CVAR_NOUNSAFEEXPAND)
 
cvar_t password = CVARF("password", "", CVAR_NOUNSAFEEXPAND)
 
cvar_t spectator_password = CVARF("spectator_password", "", CVAR_NOUNSAFEEXPAND)
 
cvar_t allow_download = CVARAD("allow_download", "1", "sv_allowDownload", "If 1, permits downloading. Set to 0 to unconditionally block *ALL* downloads from this server. You may wish to set sv_dlURL if you wish clients to still be able to download content.")
 
cvar_t allow_download_skins = CVARD("allow_download_skins", "1", "0 blocks downloading of any file in the skins/ directory")
 
cvar_t allow_download_models = CVARD("allow_download_models", "1", "0 blocks downloading of any file in the progs/ or models/ directory")
 
cvar_t allow_download_sounds = CVARD("allow_download_sounds", "1", "0 blocks downloading of any file in the sound/ directory")
 
cvar_t allow_download_particles = CVARD("allow_download_particles", "1", "0 blocks downloading of any file in the particles/ directory")
 
cvar_t allow_download_demos = CVARD("allow_download_demos", "1", "0 blocks downloading of any file in the demos/ directory")
 
cvar_t allow_download_maps = CVARD("allow_download_maps", "1", "0 blocks downloading of any file in the maps/ directory")
 
cvar_t allow_download_logs = CVARFD("allow_download_logs", "0", CVAR_NOSET|CVAR_WARNONCHANGE, "1 permits downloading files with the extension .log\n"CON_ERROR"THIS IS DANGEROUS AS IT POTENTIALLY ALLOWS PEOPLE TO SEE PASSWORDS OR OTHER PRIVATE INFORMATION.\nNote that it can be switch on/off via rcon.")
 
cvar_t allow_download_anymap = CVARFD("allow_download_pakmaps", "0", CVAR_WARNONCHANGE, "0: clients may not download map files within the server's packages.\n1: clients may download such files so long as the package is not deemed copyrighted, for compat with old clients that do not support package downloads.\n2: client may download such files regardless of copyright state (WARNING! Should never be used!).")
 
cvar_t allow_download_pakcontents = CVARFD("allow_download_pakcontents", "0", CVAR_WARNONCHANGE, "0: clients may not download non-map files within the server's packages.\n1: clients may download such files so long as the package is not deemed copyrighted, for compat with old clients that do not support package downloads.\n2: client may download such files regardless of copyright state (WARNING! ONLY for consistency with vanilla QuakeWorld!).")
 
cvar_t allow_download_root = CVARFD("allow_download_root", "0", CVAR_WARNONCHANGE, "If set, enables downloading from the root of the gamedir (not the basedir). This setting has a lower priority than extension-based checks.")
 
cvar_t allow_download_textures = CVARD("allow_download_textures", "1", "0 blocks downloading of any file in the textures/ directory")
 
cvar_t allow_download_packages = CVARD("allow_download_packages", "1", "if 1, permits downloading files (from root directory or elsewhere) with known package extensions (eg: pak+pk3). Packages with a name starting 'pak' are covered by allow_download_copyrighted as well.")
 
cvar_t allow_download_refpackages = CVARD("allow_download_refpackages", "1", "If set to 1, packages that contain files needed during spawn functions will be become 'referenced' and automatically downloaded to clients.\nThis cvar should probably not be set if you have large packages that provide replacement pickup models on public servers.\nThe path command will show a '(ref)' tag next to packages which clients will automatically attempt to download.")
 
cvar_t allow_download_wads = CVARD("allow_download_wads", "1", "0 blocks downloading of any file in the wads/ directory, or is in the root directory with the extension .wad")
 
cvar_t allow_download_configs = CVARFD("allow_download_configs", "0", CVAR_WARNONCHANGE, "1 allows downloading of config files, either with the extension .cfg or in the subdir configs/.\n"CON_ERROR"THIS IS DANGEROUS AS IT CAN ALLOW PEOPLE TO READ YOUR RCON PASSWORD ETC.")
 
cvar_t allow_download_locs = CVARD("allow_download_locs", "1", "0 blocks downloading of any file in the locs/ directory")
 
cvar_t allow_download_copyrighted = CVARFD("allow_download_copyrighted", "0", CVAR_WARNONCHANGE, "0 blocks download of packages that are considered copyrighted. Specifically, this means packages with a leading 'pak' prefix on the filename.\nIf you take your copyrights seriously, you should also set allow_download_pakmaps 0 and allow_download_pakcontents 0.")
 
cvar_t allow_download_other = CVARD("allow_download_other", "0", "0 blocks downloading of any file that was not covered by any of the directory download blocks.")
 
cvar_t sv_allow_splitscreen = CVARFD("allow_splitscreen","",CVAR_SERVERINFO, "Specifies whether clients can use splitscreen extensions to dynamically add additional clients. This only affects remote clients and not the built-in client.\nClients may need to reconnect in order to add seats when this is changed.")
 
cvar_t sv_public = CVARCD("sv_public", "0", SV_Public_Callback, "-1: Fully blocks all inbound connections.\n0: Disable subscribing to master servers (for private lan-only games).\n1: Subscribe to public master servers. Your IP address will be listed publicly. Make sure your Router/NAT+Firewall are set to allow inbound connections.\n2: Subscribe to a broker master, allowing firewall hole punching.")
 
cvar_t sv_guidhash = CVARD("sv_guidkey", "", "If set, clients will calculate their GUID values against this string instead of the server's IP address. This allows consistency between multiple servers (for stats tracking), but do NOT treat the client's GUID as something that is secure.")
 
cvar_t sv_serverip = CVARD("sv_serverip", "", "Set this cvar to the server's public ip address if the server is behind a firewall and cannot detect its own public address. Providing a port is required if the firewall/nat remaps it, but is otherwise optional.")
 
cvar_t sv_listen_qw = CVARAFD("sv_listen_qw", "1", "sv_listen", 0, "Specifies whether normal clients are allowed to connect.")
 
cvar_t sv_listen_nq = CVARD("sv_listen_nq", "0", "Allow new (net)quake clients to connect to the server.\n0 = don't let them in.\n1 = allow them in (WARNING: this allows 'qsmurf' DOS attacks).\n2 = accept (net)quake clients by emulating a challenge (as secure as QW/Q2 but does not fully conform to the NQ protocol).\nYou may also need to set net_enable_dtls if you wish for the rerelease's client to connect.")
 
cvar_t sv_listen_dp = CVARD("sv_listen_dp", "0", "Allows the server to respond with the DP-specific handshake protocol.\nWarning: this can potentially get confused with quake2, and results in race conditions with both vanilla netquake and quakeworld protocols.\nOn the plus side, DP clients can usually be identified correctly, enabling a model+sound limit boost.")
 
cvar_t sv_listen_q3 = CVAR("sv_listen_q3", "0")
 
cvar_t sv_reconnectlimit = CVARD("sv_reconnectlimit", "0", "Blocks dupe connection within the specified length of time .")
 
cvar_t sv_use_dns = CVARD("sv_use_dns", "", "Performs a reverse-dns lookup in order to report more info about where clients are connecting from.")
 
cvar_t sv_reportheartbeats = CVARD("sv_reportheartbeats", "2", "Print a notice each time a heartbeat is sent to a master server. When set to 2, the message will be displayed once.")
 
cvar_t sv_heartbeat_interval = CVARD("sv_heartbeat_interval", "110", "Interval between heartbeats. Low values are abusive, high values may cause NAT/ghost issues.")
 
cvar_t sv_heartbeat_checks = CVARD("sv_heartbeat_checks", "1", "Report when sv_public 1 fails due to PROBABLE router/NAT issues.")
 
cvar_t sv_highchars = CVAR("sv_highchars", "1")
 
cvar_t sv_maxrate = CVARCD("sv_maxrate", "50000", CvarPostfixKMG, "This controls the maximum number of bytes any indivual player may receive (when not downloading). The individual user's rate will also be controlled by the user's rate cvar.")
 
cvar_t sv_maxdrate
 
cvar_t sv_minping = CVARFD("sv_minping", "", CVAR_SERVERINFO, "Simulate fake lag for any players with a ping under the value specified here. Value is in milliseconds.")
 
cvar_t sv_bigcoords = CVARFD("sv_bigcoords", "1", 0, "Uses floats for coordinates instead of 16bit values.\nAlso boosts angle precision, so can be useful even on small maps.\nAffects clients thusly:\nQW: enforces a mandatory protocol extension\nDP: enables DPP7 protocol support\nNQ: uses RMQ protocol (protocol 999).")
 
cvar_t sv_calcphs = CVARFD("sv_calcphs", "2", CVAR_MAPLATCH, "Enables culling of sound effects. 0=always skip phs. Sounds are globally broadcast. 1=always generate phs. Sounds are always culled. On large maps the phs will be dumped to disk. 2=On large single-player maps, generation of phs is skipped. Otherwise like option 1.")
 
cvar_t sv_showconnectionlessmessages = CVARD("sv_showconnectionlessmessages", "0", "Display a line describing each connectionless message that arrives on the server. Primarily a debugging feature, but also potentially useful to admins.")
 
cvar_t sv_cullplayers_trace = CVARFD("sv_cullplayers_trace", "", CVAR_SERVERINFO, "Attempt to cull player entities using tracelines as an anti-wallhack.")
 
cvar_t sv_cullentities_trace = CVARFD("sv_cullentities_trace", "", CVAR_SERVERINFO, "Attempt to cull non-player entities using tracelines as an extreeme anti-wallhack.")
 
cvar_t sv_phs = CVARD("sv_phs", "1", "If 1, do not use the phs. It is generally better to use sv_calcphs instead, and leave this as 1.")
 
cvar_t sv_resetparms = CVAR("sv_resetparms", "0")
 
cvar_t sv_pupglow = CVARFD("sv_pupglow", "", CVAR_SERVERINFO, "Instructs clients to enable hexen2-style powerup pulsing.")
 
cvar_t sv_master = CVAR("sv_master", "0")
 
cvar_t sv_reliable_sound = CVARFD("sv_reliable_sound", "0", 0, "Causes all sounds to be sent reliably, so they will not be missed due to packetloss. However, this will cause them to be delayed somewhat, and slightly bursty. This can be overriden using the 'rsnd' userinfo setting (either forced on or forced off). Note: this does not affect sounds attached to particle effects.")
 
cvar_t sv_gamespeed = CVARAF("sv_gamespeed", "1", "slowmo", 0)
 
cvar_t sv_csqcdebug = CVARD("sv_csqcdebug", "0", "Inject packet size information for data directed to csqc.")
 
cvar_t sv_csqc_progname = CVARAF("sv_csqc_progname", "csprogs.dat", "csqc_progname", 0)
 
cvar_t pausable = CVAR("pausable", "")
 
cvar_t sv_banproxies = CVARD("sv_banproxies", "0", "If enabled, anyone connecting via known proxy software will be refused entry. This should aid with blocking aimbots, but is only reliable for certain public proxies.")
 
cvar_t sv_specprint = CVARD("sv_specprint", "3", "Bitfield that controls which player events spectators see when tracking that player.\n&1: spectators will see centerprints.\n&2: spectators will see sprints (pickup messages etc).\n&4: spectators will receive console commands, this is potentially risky.\nIndividual spectators can use 'setinfo sp foo' to limit this setting.")
 
cvar_t sv_protocol = CVARD("sv_protocol", "", "Specifies which protocol extensions to force. recognised values: csqc")
 
cvar_t fraglimit = CVARF("fraglimit", "" , CVAR_SERVERINFO)
 
cvar_t timelimit = CVARF("timelimit", "" , CVAR_SERVERINFO)
 
cvar_t teamplay = CVARF("teamplay", "" , CVAR_SERVERINFO)
 
cvar_t samelevel = CVARF("samelevel", "" , CVAR_SERVERINFO)
 
cvar_t sv_playerslots
 
cvar_t maxclients
 
cvar_t maxspectators = CVARFD("maxspectators", "8", CVAR_SERVERINFO, "Specify the maximum number of spectators allowed on the server at once. Can be changed mid-map.")
 
cvar_t deathmatch = CVARF("deathmatch", "1", CVAR_SERVERINFO)
 
cvar_t coop = CVARF("coop", "" , CVAR_SERVERINFO)
 
cvar_t skill = CVARF("skill", "" , CVAR_SERVERINFO)
 
cvar_t spawn = CVARF("spawn", "" , CVAR_SERVERINFO)
 
cvar_t watervis = CVARF("watervis", "" , CVAR_SERVERINFO)
 
cvar_t allow_skybox = CVARFD("allow_skybox", "", CVAR_SERVERINFO, "This setting says whether clients should skip writing skybox depth when rendering skyboxes/skydomes. Skipping depth writes is required for halflife, quake2, and quake3 compat, but q1 content generally requires depth masking. Empty uses format-specific defaults.")
 
cvar_t fbskins = CVARF("fbskins", "", CVAR_SERVERINFO)
 
cvar_t sv_motd []
 
cvar_t sv_compatiblehulls = CVAR("sv_compatiblehulls", "1")
 
cvar_t dpcompat_stats = CVAR("dpcompat_stats", "0")
 
cvar_t hostname = CVARF("hostname","unnamed", CVAR_SERVERINFO)
 
cvar_t secure = CVARF("secure", "", CVAR_SERVERINFO)
 
cvar_t sv_nqplayerphysics
 
char cvargroup_serverpermissions [] = "server permission variables"
 
char cvargroup_serverinfo [] = "serverinfo variables"
 
char cvargroup_serverphysics [] = "server physics variables"
 
char cvargroup_servercontrol [] = "server control variables"
 
vfsfile_tsv_fraglogfile
 
int nextuserid
 
pinnedmessages_tpinned
 
qboolean dopinnedload = true
 
cvar_t filterban = CVARD("filterban", "1", "If 0, players will be kicked by default unless there is a rule that allows them. Also affects the default action of addip.")
 
double server_frametime
 

Typedef Documentation

◆ pinnedmessages_t

typedef struct pinnedmessages_s pinnedmessages_t

Function Documentation

◆ CvarPostfixKMG()

void CvarPostfixKMG ( cvar_t v,
char *  oldval 
)

◆ Host_EndGame()

void VARGS Host_EndGame ( const char *  error,
  ... 
)

◆ Host_Error()

void VARGS Host_Error ( const char *  error,
  ... 
)

◆ Log_Init()

void Log_Init ( void  )

◆ PIN_DeleteOldestMessage()

void PIN_DeleteOldestMessage ( void  )

◆ PIN_LoadMessages()

void PIN_LoadMessages ( void  )

◆ PIN_MakeMessage()

void PIN_MakeMessage ( char *  from,
char *  msg 
)

◆ PIN_SaveMessages()

void PIN_SaveMessages ( void  )

◆ PIN_ShowMessages()

void PIN_ShowMessages ( client_t cl)

◆ PRH2_SetPlayerClass()

void PRH2_SetPlayerClass ( client_t cl,
int  classnum,
qboolean  fromqc 
)

◆ QCExternalDebuggerCommand()

qboolean QCExternalDebuggerCommand ( char *  text)

◆ ReloadRanking()

qboolean ReloadRanking ( client_t cl,
const char *  newname 
)

◆ ServerPaused()

qboolean ServerPaused ( void  )

◆ SV_AcceptMessage()

void SV_AcceptMessage ( client_t newcl)

◆ SV_AddSplit()

client_t * SV_AddSplit ( client_t controller,
char *  info,
int  id 
)

◆ SV_ArgumentOverrides()

void SV_ArgumentOverrides ( void  )

◆ SV_CalcPing()

int SV_CalcPing ( client_t cl,
qboolean  forcecalc 
)

◆ SV_ChallengePasses()

qboolean SV_ChallengePasses ( int  challenge)

◆ SV_CheckTimeouts()

void SV_CheckTimeouts ( void  )

◆ SV_CheckVars()

void SV_CheckVars ( void  )

◆ SV_ClientProtocolExtensionsChanged()

void SV_ClientProtocolExtensionsChanged ( client_t client)

◆ SV_ConnectionlessPacket()

qboolean SV_ConnectionlessPacket ( void  )

◆ SV_DeDupeName()

void SV_DeDupeName ( const char *  val,
client_t cl,
char *  newname,
size_t  newnamesize 
)

◆ SV_Demo_Init()

void SV_Demo_Init ( void  )

◆ SV_DoDirectConnect()

void SV_DoDirectConnect ( svconnectinfo_t *fte_restrict  info)

◆ SV_DropClient()

void SV_DropClient ( client_t drop)

◆ SV_Error()

void VARGS SV_Error ( char *  error,
  ... 
)

◆ SV_ExecInitialConfigs()

void SV_ExecInitialConfigs ( char *  defaultexec)

◆ SV_ExtractFromUserinfo()

void SV_ExtractFromUserinfo ( client_t cl,
qboolean  verbose 
)

verbose is a gamecode-forced update, where the gamecode is expected to know what its doing.

◆ SV_FinalMessage()

void SV_FinalMessage ( char *  message)

◆ SV_FixupName()

void SV_FixupName ( const char *  in,
char *  out,
unsigned int  outlen 
)

◆ SV_Frame()

float SV_Frame ( void  )

◆ SV_FullClientUpdate()

void SV_FullClientUpdate ( client_t client,
client_t to 
)

◆ SV_GetConsoleCommands()

void SV_GetConsoleCommands ( void  )

◆ SV_GetPacket()

qboolean SV_GetPacket ( void  )

◆ SV_GetProtocolVersionString()

const char * SV_GetProtocolVersionString ( void  )

◆ SV_Impulse_f()

void SV_Impulse_f ( void  )

◆ SV_Init()

void SV_Init ( quakeparms_t parms)

◆ SV_InitLocal()

void SV_InitLocal ( void  )

◆ SV_InitNet()

void SV_InitNet ( void  )

◆ SV_KillExpiredBans()

void SV_KillExpiredBans ( void  )

◆ SV_NewChallenge()

int SV_NewChallenge ( void  )

◆ SV_OpenRoute_f()

void SV_OpenRoute_f ( void  )

◆ SV_PlayerPublicAddress()

char * SV_PlayerPublicAddress ( client_t cl)

◆ SV_ProtocolNameForClient()

const char * SV_ProtocolNameForClient ( client_t cl)

◆ SV_RateForClient()

int SV_RateForClient ( client_t cl)

◆ SV_ReadPacket()

void SV_ReadPacket ( void  )

◆ SV_ReadPackets()

qboolean SV_ReadPackets ( float *  delay)

◆ SV_RejectMessage()

void VARGS SV_RejectMessage ( enum serverprotocols_e  protocol,
char *  format,
  ... 
)

◆ SV_Shutdown()

void SV_Shutdown ( void  )

◆ SVC_ACK()

void SVC_ACK ( void  )

◆ SVC_DirectConnect()

void SVC_DirectConnect ( int  expectedreliablesequence)

◆ SVC_GetChallenge()

qboolean SVC_GetChallenge ( qboolean  respond_dp)

◆ SVC_ICE_Candidate()

void SVC_ICE_Candidate ( void  )

◆ SVC_ICE_Offer()

void SVC_ICE_Offer ( void  )

◆ SVC_Ping()

void SVC_Ping ( void  )

◆ SVC_RealIP()

void SVC_RealIP ( void  )

◆ SVC_RemoteCommand()

void SVC_RemoteCommand ( void  )

◆ SVC_ThrottleInfo()

qboolean SVC_ThrottleInfo ( void  )

◆ SVNQ_ConnectionlessPacket()

qboolean SVNQ_ConnectionlessPacket ( void  )

◆ SVQ2_ClearEvents()

void SVQ2_ClearEvents ( void  )

Variable Documentation

◆ allow_download

cvar_t allow_download = CVARAD("allow_download", "1", "sv_allowDownload", "If 1, permits downloading. Set to 0 to unconditionally block *ALL* downloads from this server. You may wish to set sv_dlURL if you wish clients to still be able to download content.")

◆ allow_download_anymap

cvar_t allow_download_anymap = CVARFD("allow_download_pakmaps", "0", CVAR_WARNONCHANGE, "0: clients may not download map files within the server's packages.\n1: clients may download such files so long as the package is not deemed copyrighted, for compat with old clients that do not support package downloads.\n2: client may download such files regardless of copyright state (WARNING! Should never be used!).")

◆ allow_download_configs

cvar_t allow_download_configs = CVARFD("allow_download_configs", "0", CVAR_WARNONCHANGE, "1 allows downloading of config files, either with the extension .cfg or in the subdir configs/.\n"CON_ERROR"THIS IS DANGEROUS AS IT CAN ALLOW PEOPLE TO READ YOUR RCON PASSWORD ETC.")

◆ allow_download_copyrighted

cvar_t allow_download_copyrighted = CVARFD("allow_download_copyrighted", "0", CVAR_WARNONCHANGE, "0 blocks download of packages that are considered copyrighted. Specifically, this means packages with a leading 'pak' prefix on the filename.\nIf you take your copyrights seriously, you should also set allow_download_pakmaps 0 and allow_download_pakcontents 0.")

◆ allow_download_demos

cvar_t allow_download_demos = CVARD("allow_download_demos", "1", "0 blocks downloading of any file in the demos/ directory")

◆ allow_download_locs

cvar_t allow_download_locs = CVARD("allow_download_locs", "1", "0 blocks downloading of any file in the locs/ directory")

◆ allow_download_logs

cvar_t allow_download_logs = CVARFD("allow_download_logs", "0", CVAR_NOSET|CVAR_WARNONCHANGE, "1 permits downloading files with the extension .log\n"CON_ERROR"THIS IS DANGEROUS AS IT POTENTIALLY ALLOWS PEOPLE TO SEE PASSWORDS OR OTHER PRIVATE INFORMATION.\nNote that it can be switch on/off via rcon.")

◆ allow_download_maps

cvar_t allow_download_maps = CVARD("allow_download_maps", "1", "0 blocks downloading of any file in the maps/ directory")

◆ allow_download_models

cvar_t allow_download_models = CVARD("allow_download_models", "1", "0 blocks downloading of any file in the progs/ or models/ directory")

◆ allow_download_other

cvar_t allow_download_other = CVARD("allow_download_other", "0", "0 blocks downloading of any file that was not covered by any of the directory download blocks.")

◆ allow_download_packages

cvar_t allow_download_packages = CVARD("allow_download_packages", "1", "if 1, permits downloading files (from root directory or elsewhere) with known package extensions (eg: pak+pk3). Packages with a name starting 'pak' are covered by allow_download_copyrighted as well.")

◆ allow_download_pakcontents

cvar_t allow_download_pakcontents = CVARFD("allow_download_pakcontents", "0", CVAR_WARNONCHANGE, "0: clients may not download non-map files within the server's packages.\n1: clients may download such files so long as the package is not deemed copyrighted, for compat with old clients that do not support package downloads.\n2: client may download such files regardless of copyright state (WARNING! ONLY for consistency with vanilla QuakeWorld!).")

◆ allow_download_particles

cvar_t allow_download_particles = CVARD("allow_download_particles", "1", "0 blocks downloading of any file in the particles/ directory")

◆ allow_download_refpackages

cvar_t allow_download_refpackages = CVARD("allow_download_refpackages", "1", "If set to 1, packages that contain files needed during spawn functions will be become 'referenced' and automatically downloaded to clients.\nThis cvar should probably not be set if you have large packages that provide replacement pickup models on public servers.\nThe path command will show a '(ref)' tag next to packages which clients will automatically attempt to download.")

◆ allow_download_root

cvar_t allow_download_root = CVARFD("allow_download_root", "0", CVAR_WARNONCHANGE, "If set, enables downloading from the root of the gamedir (not the basedir). This setting has a lower priority than extension-based checks.")

◆ allow_download_skins

cvar_t allow_download_skins = CVARD("allow_download_skins", "1", "0 blocks downloading of any file in the skins/ directory")

◆ allow_download_sounds

cvar_t allow_download_sounds = CVARD("allow_download_sounds", "1", "0 blocks downloading of any file in the sound/ directory")

◆ allow_download_textures

cvar_t allow_download_textures = CVARD("allow_download_textures", "1", "0 blocks downloading of any file in the textures/ directory")

◆ allow_download_wads

cvar_t allow_download_wads = CVARD("allow_download_wads", "1", "0 blocks downloading of any file in the wads/ directory, or is in the root directory with the extension .wad")

◆ allow_skybox

cvar_t allow_skybox = CVARFD("allow_skybox", "", CVAR_SERVERINFO, "This setting says whether clients should skip writing skybox depth when rendering skyboxes/skydomes. Skipping depth writes is required for halflife, quake2, and quake3 compat, but q1 content generally requires depth masking. Empty uses format-specific defaults.")

◆ coop

cvar_t coop = CVARF("coop", "" , CVAR_SERVERINFO)

◆ cvargroup_servercontrol

char cvargroup_servercontrol[] = "server control variables"

◆ cvargroup_serverinfo

char cvargroup_serverinfo[] = "serverinfo variables"

◆ cvargroup_serverpermissions

char cvargroup_serverpermissions[] = "server permission variables"

◆ cvargroup_serverphysics

char cvargroup_serverphysics[] = "server physics variables"

◆ deathmatch

cvar_t deathmatch = CVARF("deathmatch", "1", CVAR_SERVERINFO)

◆ dopinnedload

qboolean dopinnedload = true

◆ dpcompat_stats

cvar_t dpcompat_stats = CVAR("dpcompat_stats", "0")

◆ fbskins

cvar_t fbskins = CVARF("fbskins", "", CVAR_SERVERINFO)

◆ filterban

cvar_t filterban = CVARD("filterban", "1", "If 0, players will be kicked by default unless there is a rule that allows them. Also affects the default action of addip.")

◆ fraglimit

cvar_t fraglimit = CVARF("fraglimit", "" , CVAR_SERVERINFO)

◆ fraglog_details

cvar_t fraglog_details = CVARD("fraglog_details", "1", "Bitmask\n1: killer+killee names.\n2: killer+killee teams\n4:timestamp.\n8:killer weapon\n16:killer+killee guid.\nFor compatibility, use 1(vanilla) or 7(mvdsv).")

◆ fraglog_public

cvar_t fraglog_public = CVARD("fraglog_public", "1", "Enables support for connectionless fraglog requests")

◆ host_client

client_t* host_client

◆ hostname

cvar_t hostname = CVARF("hostname","unnamed", CVAR_SERVERINFO)

◆ maxclients

cvar_t maxclients
Initial value:
= CVARAFD("maxclients", "8",
"sv_maxclients", CVAR_SERVERINFO, "Specify the maximum number of players allowed on the server at once. Can be changed mid-map.")

◆ maxspectators

cvar_t maxspectators = CVARFD("maxspectators", "8", CVAR_SERVERINFO, "Specify the maximum number of spectators allowed on the server at once. Can be changed mid-map.")

◆ nextuserid

int nextuserid

◆ password

cvar_t password = CVARF("password", "", CVAR_NOUNSAFEEXPAND)

◆ pausable

cvar_t pausable = CVAR("pausable", "")

◆ pinned

◆ rcon_password

cvar_t rcon_password = CVARF("rcon_password", "", CVAR_NOUNSAFEEXPAND)

◆ samelevel

cvar_t samelevel = CVARF("samelevel", "" , CVAR_SERVERINFO)

◆ secure

cvar_t secure = CVARF("secure", "", CVAR_SERVERINFO)

◆ server_frametime

double server_frametime

◆ skill

cvar_t skill = CVARF("skill", "" , CVAR_SERVERINFO)

◆ spawn

cvar_t spawn = CVARF("spawn", "" , CVAR_SERVERINFO)

◆ spectator_password

cvar_t spectator_password = CVARF("spectator_password", "", CVAR_NOUNSAFEEXPAND)

◆ sv_allow_splitscreen

cvar_t sv_allow_splitscreen = CVARFD("allow_splitscreen","",CVAR_SERVERINFO, "Specifies whether clients can use splitscreen extensions to dynamically add additional clients. This only affects remote clients and not the built-in client.\nClients may need to reconnect in order to add seats when this is changed.")

◆ sv_banproxies

cvar_t sv_banproxies = CVARD("sv_banproxies", "0", "If enabled, anyone connecting via known proxy software will be refused entry. This should aid with blocking aimbots, but is only reliable for certain public proxies.")

◆ sv_bigcoords

cvar_t sv_bigcoords = CVARFD("sv_bigcoords", "1", 0, "Uses floats for coordinates instead of 16bit values.\nAlso boosts angle precision, so can be useful even on small maps.\nAffects clients thusly:\nQW: enforces a mandatory protocol extension\nDP: enables DPP7 protocol support\nNQ: uses RMQ protocol (protocol 999).")

◆ sv_calcphs

cvar_t sv_calcphs = CVARFD("sv_calcphs", "2", CVAR_MAPLATCH, "Enables culling of sound effects. 0=always skip phs. Sounds are globally broadcast. 1=always generate phs. Sounds are always culled. On large maps the phs will be dumped to disk. 2=On large single-player maps, generation of phs is skipped. Otherwise like option 1.")

◆ sv_compatiblehulls

cvar_t sv_compatiblehulls = CVAR("sv_compatiblehulls", "1")

◆ sv_crypt_rcon

cvar_t sv_crypt_rcon = CVARFD("sv_crypt_rcon", "", CVAR_ARCHIVE, "Controls whether the rcon password must be hashed or not. Hashed passwords also partially prevent replay attacks, but does NOT prevent malicious actors from reading the commands/results.\n0: completely insecure. ONLY allows plain-text passwords. Do not use.\n1: Mandatory hashing (recommended).\nEmpty: Allow either, whether the password is secure or not is purely the client's responsibility/fault. Only use this for comptibility with old clients.")

◆ sv_crypt_rcon_clockskew

cvar_t sv_crypt_rcon_clockskew = CVARFD("sv_timestamplen", "60", CVAR_ARCHIVE, "Limits clock skew to reduce (delayed) replay attacks")

◆ sv_csqc_progname

cvar_t sv_csqc_progname = CVARAF("sv_csqc_progname", "csprogs.dat", "csqc_progname", 0)

◆ sv_csqcdebug

cvar_t sv_csqcdebug = CVARD("sv_csqcdebug", "0", "Inject packet size information for data directed to csqc.")

◆ sv_cullentities_trace

cvar_t sv_cullentities_trace = CVARFD("sv_cullentities_trace", "", CVAR_SERVERINFO, "Attempt to cull non-player entities using tracelines as an extreeme anti-wallhack.")

◆ sv_cullplayers_trace

cvar_t sv_cullplayers_trace = CVARFD("sv_cullplayers_trace", "", CVAR_SERVERINFO, "Attempt to cull player entities using tracelines as an anti-wallhack.")

◆ sv_fraglogfile

vfsfile_t* sv_fraglogfile

◆ sv_gamespeed

cvar_t sv_gamespeed = CVARAF("sv_gamespeed", "1", "slowmo", 0)

◆ sv_guidhash

cvar_t sv_guidhash = CVARD("sv_guidkey", "", "If set, clients will calculate their GUID values against this string instead of the server's IP address. This allows consistency between multiple servers (for stats tracking), but do NOT treat the client's GUID as something that is secure.")

◆ sv_heartbeat_checks

cvar_t sv_heartbeat_checks = CVARD("sv_heartbeat_checks", "1", "Report when sv_public 1 fails due to PROBABLE router/NAT issues.")

◆ sv_heartbeat_interval

cvar_t sv_heartbeat_interval = CVARD("sv_heartbeat_interval", "110", "Interval between heartbeats. Low values are abusive, high values may cause NAT/ghost issues.")

◆ sv_highchars

cvar_t sv_highchars = CVAR("sv_highchars", "1")

◆ sv_limittics

cvar_t sv_limittics = CVARD("sv_limittics","3", "The maximum number of ticks that may be run within a frame, to allow the server to catch up if it stalled or if sv_maxtic is too low.")

◆ sv_listen_dp

cvar_t sv_listen_dp = CVARD("sv_listen_dp", "0", "Allows the server to respond with the DP-specific handshake protocol.\nWarning: this can potentially get confused with quake2, and results in race conditions with both vanilla netquake and quakeworld protocols.\nOn the plus side, DP clients can usually be identified correctly, enabling a model+sound limit boost.")

◆ sv_listen_nq

cvar_t sv_listen_nq = CVARD("sv_listen_nq", "0", "Allow new (net)quake clients to connect to the server.\n0 = don't let them in.\n1 = allow them in (WARNING: this allows 'qsmurf' DOS attacks).\n2 = accept (net)quake clients by emulating a challenge (as secure as QW/Q2 but does not fully conform to the NQ protocol).\nYou may also need to set net_enable_dtls if you wish for the rerelease's client to connect.")

◆ sv_listen_q3

cvar_t sv_listen_q3 = CVAR("sv_listen_q3", "0")

◆ sv_listen_qw

cvar_t sv_listen_qw = CVARAFD("sv_listen_qw", "1", "sv_listen", 0, "Specifies whether normal clients are allowed to connect.")

◆ sv_master

cvar_t sv_master = CVAR("sv_master", "0")

◆ sv_maxdrate

cvar_t sv_maxdrate
Initial value:
= CVARAFCD("sv_maxdrate", "500000",
"sv_maxdownloadrate", 0, CvarPostfixKMG, "This cvar controls the maximum number of bytes sent to each player per second while that player is downloading.\nIf this cvar is set to 0, there will be NO CAP for download rates (if the user's drate is empty/0 too, then expect really fast+abusive downloads that could potentially be considered denial of service attacks)")
void CvarPostfixKMG(cvar_t *v, char *oldval)
Definition: sv_main.c:36

◆ sv_maxrate

cvar_t sv_maxrate = CVARCD("sv_maxrate", "50000", CvarPostfixKMG, "This controls the maximum number of bytes any indivual player may receive (when not downloading). The individual user's rate will also be controlled by the user's rate cvar.")

◆ sv_maxtic

cvar_t sv_maxtic = CVARD("sv_maxtic","0.1", "The maximum interval between running physics frames. If the value is too low, multiple physics interations might be run at a time (based upon sv_limittics). Set to 0 for fixed-interval ticks, which may be required if ODE is used.")

◆ sv_minping

cvar_t sv_minping = CVARFD("sv_minping", "", CVAR_SERVERINFO, "Simulate fake lag for any players with a ping under the value specified here. Value is in milliseconds.")

◆ sv_mintic

cvar_t sv_mintic = CVARD("sv_mintic","0.013", "The minimum interval between running physics frames.")

◆ sv_motd

cvar_t sv_motd[]
Initial value:
={ CVAR("sv_motd1", ""),
CVAR("sv_motd2", ""),
CVAR("sv_motd3", ""),
CVAR("sv_motd4", "") }

◆ sv_nailhack

cvar_t sv_nailhack = CVARD("sv_nailhack","1", "If set to 1, disables the nail entity networking optimisation. This hack was popularised by qizmo which recommends it for better compression. Also allows clients to interplate nail positions and add trails.")

◆ sv_nopvs

cvar_t sv_nopvs = CVARD("sv_nopvs", "0", "Set to 1 to ignore pvs on the server. This can make wallhacks more dangerous, so should only be used for debugging.")

◆ sv_nqplayerphysics

cvar_t sv_nqplayerphysics
extern

◆ sv_phs

cvar_t sv_phs = CVARD("sv_phs", "1", "If 1, do not use the phs. It is generally better to use sv_calcphs instead, and leave this as 1.")

◆ sv_playerslots

cvar_t sv_playerslots
Initial value:
= CVARAD("sv_playerslots", "",
"maxplayers", "Specify maximum number of player/spectator/bot slots, new value takes effect on the next map (this may result in players getting kicked). This should generally be set to maxclients+maxspectators. Leave blank for a default value.\nMaximum value of "STRINGIFY(MAX_CLIENTS)". Values above 16 will result in issues with vanilla NQ clients. Effective values other than 32 will result in issues with vanilla QW clients.")

◆ sv_protocol

cvar_t sv_protocol = CVARD("sv_protocol", "", "Specifies which protocol extensions to force. recognised values: csqc")

◆ sv_public

cvar_t sv_public = CVARCD("sv_public", "0", SV_Public_Callback, "-1: Fully blocks all inbound connections.\n0: Disable subscribing to master servers (for private lan-only games).\n1: Subscribe to public master servers. Your IP address will be listed publicly. Make sure your Router/NAT+Firewall are set to allow inbound connections.\n2: Subscribe to a broker master, allowing firewall hole punching.")

◆ sv_pupglow

cvar_t sv_pupglow = CVARFD("sv_pupglow", "", CVAR_SERVERINFO, "Instructs clients to enable hexen2-style powerup pulsing.")

◆ sv_rconlim

cvar_t sv_rconlim = CVARFD("sv_rconlim", "4", CVAR_ARCHIVE, "Blocks repeated (invalid) rcon attempts.")

◆ sv_reconnectlimit

cvar_t sv_reconnectlimit = CVARD("sv_reconnectlimit", "0", "Blocks dupe connection within the specified length of time .")

◆ sv_reliable_sound

cvar_t sv_reliable_sound = CVARFD("sv_reliable_sound", "0", 0, "Causes all sounds to be sent reliably, so they will not be missed due to packetloss. However, this will cause them to be delayed somewhat, and slightly bursty. This can be overriden using the 'rsnd' userinfo setting (either forced on or forced off). Note: this does not affect sounds attached to particle effects.")

◆ sv_reportheartbeats

cvar_t sv_reportheartbeats = CVARD("sv_reportheartbeats", "2", "Print a notice each time a heartbeat is sent to a master server. When set to 2, the message will be displayed once.")

◆ sv_resetparms

cvar_t sv_resetparms = CVAR("sv_resetparms", "0")

◆ sv_serverip

cvar_t sv_serverip = CVARD("sv_serverip", "", "Set this cvar to the server's public ip address if the server is behind a firewall and cannot detect its own public address. Providing a port is required if the firewall/nat remaps it, but is otherwise optional.")

◆ sv_showconnectionlessmessages

cvar_t sv_showconnectionlessmessages = CVARD("sv_showconnectionlessmessages", "0", "Display a line describing each connectionless message that arrives on the server. Primarily a debugging feature, but also potentially useful to admins.")

◆ sv_specprint

cvar_t sv_specprint = CVARD("sv_specprint", "3", "Bitfield that controls which player events spectators see when tracking that player.\n&1: spectators will see centerprints.\n&2: spectators will see sprints (pickup messages etc).\n&4: spectators will receive console commands, this is potentially risky.\nIndividual spectators can use 'setinfo sp foo' to limit this setting.")

◆ sv_use_dns

cvar_t sv_use_dns = CVARD("sv_use_dns", "", "Performs a reverse-dns lookup in order to report more info about where clients are connecting from.")

◆ teamplay

cvar_t teamplay = CVARF("teamplay", "" , CVAR_SERVERINFO)

◆ timelimit

cvar_t timelimit = CVARF("timelimit", "" , CVAR_SERVERINFO)

◆ watervis

cvar_t watervis = CVARF("watervis", "" , CVAR_SERVERINFO)

◆ zombietime

cvar_t zombietime = CVARD("zombietime", "2", "Client slots will not be reused for this number of seconds.")