UFO: Alien Invasion
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
sv_user.cpp File Reference

Server code for moving users. More...

#include "server.h"
#include "../shared/scopedmutex.h"

Go to the source code of this file.

Data Structures

struct  ucmd_t
 

Functions

void SV_SetClientState (client_t *client, client_state_t state)
 Set the client state. More...
 
static void SV_New_f (client_t *cl)
 Sends the first message from the server to a connected client. This will be sent on the initial connection and upon each server load. Client reads via CL_ParseServerData in cl_parse.c. More...
 
static void SV_Begin_f (client_t *cl)
 
static void SV_StartMatch_f (client_t *cl)
 
static void SV_Disconnect_f (client_t *cl)
 The client is going to disconnect, so remove the connection immediately. More...
 
static void SV_ShowServerinfo_f (client_t *cl)
 Dumps the serverinfo info string. More...
 
static void SV_ExecuteUserCommand (client_t *cl, const char *s)
 
void SV_ExecuteClientMessage (client_t *cl, int cmd, dbuffer *msg)
 The current net_message is parsed for the given client. More...
 
server_state_t SV_GetServerState (void)
 
void SV_SetServerState (server_state_t state)
 

Variables

static const ucmd_t ucmds []
 

Detailed Description

Server code for moving users.

Definition in file sv_user.cpp.

Function Documentation

static void SV_Disconnect_f ( client_t cl)
static

The client is going to disconnect, so remove the connection immediately.

Definition at line 176 of file sv_user.cpp.

References SV_DropClient().

server_state_t SV_GetServerState ( void  )

Definition at line 312 of file sv_user.cpp.

References serverInstanceGame_s::state, and sv.

Referenced by Com_ServerState().

static void SV_New_f ( client_t cl)
static

Sends the first message from the server to a connected client. This will be sent on the initial connection and upon each server load. Client reads via CL_ParseServerData in cl_parse.c.

See also
CL_Reconnect_f
CL_ConnectionlessPacket

Definition at line 56 of file sv_user.cpp.

References CL_PRECACHE, Com_DPrintf(), Com_Printf(), Com_ServerState(), cs_connected, CS_MODELS, CS_NAME, CS_POSITIONS, cs_spawning, CS_TILES, DEBUG_SERVER, i, MAX_CONFIGSTRINGS, client_s::name, NET_WriteByte(), NET_WriteLong(), NET_WriteMsg(), NET_WriteShort(), NET_WriteString(), PROTOCOL_VERSION, Q_strvalid, ss_game, client_s::state, client_s::stream, SV_ClientCommand(), SV_DropClient(), SV_GetClient(), SV_GetConfigString(), SV_SetClientState(), svc_configstring, and svc_serverdata.

void SV_SetClientState ( client_t client,
client_state_t  state 
)

Set the client state.

See also
client_state_t

Definition at line 36 of file sv_user.cpp.

References Com_DPrintf(), DEBUG_SERVER, client_s::name, and client_s::state.

Referenced by SV_Begin_f(), SV_DropClient(), SV_ExecuteClientMessage(), SV_Map(), SV_New_f(), and SVC_DirectConnect().

void SV_SetServerState ( server_state_t  state)

Definition at line 317 of file sv_user.cpp.

References serverInstanceGame_s::state, and sv.

static void SV_ShowServerinfo_f ( client_t cl)
static

Dumps the serverinfo info string.

Definition at line 185 of file sv_user.cpp.

References Cvar_Serverinfo(), Info_Print(), and MAX_INFO_STRING.

Variable Documentation

const ucmd_t ucmds[]
static
Initial value:
= {
{nullptr, nullptr}
}
static void SV_StartMatch_f(client_t *cl)
Definition: sv_user.cpp:154
#define NET_STATE_DISCONNECT
Definition: q_shared.h:611
static void SV_Disconnect_f(client_t *cl)
The client is going to disconnect, so remove the connection immediately.
Definition: sv_user.cpp:176
static void SV_ShowServerinfo_f(client_t *cl)
Dumps the serverinfo info string.
Definition: sv_user.cpp:185
#define NET_STATE_BEGIN
Definition: q_shared.h:609
#define NET_STATE_NEW
Definition: q_shared.h:608
static void SV_New_f(client_t *cl)
Sends the first message from the server to a connected client. This will be sent on the initial conne...
Definition: sv_user.cpp:56
#define NET_STATE_STARTMATCH
Definition: q_shared.h:610
static void SV_Begin_f(client_t *cl)
Definition: sv_user.cpp:123
#define NET_STATE_INFO
Definition: q_shared.h:612

Definition at line 197 of file sv_user.cpp.