/*
sv_main.c
(description)
Copyright (C) 1996-1997 Id Software, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to:
Free Software Foundation, Inc.
59 Temple Place - Suite 330
Boston, MA 02111-1307, USA
$Id: sv_main.c,v 1.1.1.1 2001/03/06 09:40:23 lordhavoc Exp $
*/
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#ifdef HAVE_STRING_H
# include <string.h>
#endif
#ifdef HAVE_STRINGS_H
# include <strings.h>
#endif
#include <stdarg.h>
#include <stdlib.h>
#include "bothdefs.h"
#include "buildnum.h"
#include "cmd.h"
#include "model.h"
#include "net.h"
#include "msg.h"
#include "pmove.h"
#include "qargs.h"
#include "quakefs.h"
#include "server.h"
#include "sys.h"
#include "va.h"
#include "ver_check.h"
#include "zone.h"
quakeparms_t host_parms;
qboolean host_initialized; // true if into command execution
double sv_frametime;
double realtime; // without any filtering or bounding
int host_hunklevel;
netadr_t master_adr[MAX_MASTERS]; // address of group servers
client_t *host_client; // current client
// DoS protection
// FLOOD_PING, FLOOD_LOG, FLOOD_CONNECT, FLOOD_STATUS, FLOOD_RCON, FLOOD_BAN
// fixme: these default values need to be tweaked after more testing
double netdosexpire[DOSFLOODCMDS] = { 1, 1, 2, 0.9, 1, 5 };
double netdosvalues[DOSFLOODCMDS] = { 12, 1, 3, 1, 1, 1 };
cvar_t *sv_netdosprotect; // tone down DoS from quake servers
cvar_t *sv_allow_status;
cvar_t *sv_allow_log;
cvar_t *sv_allow_ping;
cvar_t *fs_globalcfg;
cvar_t *fs_usercfg;
cvar_t *sv_mintic; // bound the size of the
cvar_t *sv_maxtic; // physics time tic
cvar_t *developer; // show extra messages
cvar_t *timeout; // seconds without any message
cvar_t *zombietime; // seconds to sink messages after
// disconnect
cvar_t *rcon_password; // password for remote server
// commands
cvar_t *password; // password for entering the game
cvar_t *spectator_password; // password for entering as a
// spectator
cvar_t *allow_download;
cvar_t *allow_download_skins;
cvar_t *allow_download_models;
cvar_t *allow_download_sounds;
cvar_t *allow_download_maps;
cvar_t *sv_highchars;
cvar_t *sv_phs;
cvar_t *pausable;
extern cvar_t *sv_timekick;
extern cvar_t *sv_timekick_fuzz;
extern cvar_t *sv_timekick_interval;
cvar_t *sv_minqfversion; // Minimum QF version allowed to
// connect
cvar_t *sv_maxrate; // Maximum allowable rate (silently
// capped)
cvar_t *sv_timestamps;
cvar_t *sv_timefmt;
//
// game rules mirrored in svs.info
//
cvar_t *fraglimit;
cvar_t *timelimit;
cvar_t *teamplay;
cvar_t *samelevel;
cvar_t *maxclients;
cvar_t *maxspectators;
cvar_t *deathmatch; // 0, 1, or 2
cvar_t *spawn;
cvar_t *watervis;
cvar_t *hostname;
QFile *sv_logfile;
QFile *sv_fraglogfile;
void SV_AcceptClient (netadr_t adr, int userid, char *userinfo);
void Master_Shutdown (void);
//============================================================================
qboolean
ServerPaused (void)
{
return sv.paused;
}
/*
SV_Shutd