Server code for moving users. More...
#include "server.h"
Go to the source code of this file.
Data Structures | |
struct | ucmd_t |
Functions | |
void | SV_SetClientState (client_t *client, int state) |
Set the client state. | |
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. | |
static void | SV_Begin_f (client_t *cl) |
static void | SV_Spawn_f (client_t *cl) |
static void | SV_Disconnect_f (client_t *cl) |
The client is going to disconnect, so remove the connection immediately. | |
static void | SV_ShowServerinfo_f (client_t *cl) |
Dumps the serverinfo info string. | |
static void | SV_ExecuteUserCommand (client_t *cl, const char *s) |
void | SV_ExecuteClientMessage (client_t *cl, int cmd, struct dbuffer *msg) |
The current net_message is parsed for the given client. | |
Variables | |
static const ucmd_t | ucmds [] |
Server code for moving users.
Definition in file sv_user.c.
static void SV_Begin_f | ( | client_t * | cl | ) | [static] |
Definition at line 114 of file sv_user.c.
References Cbuf_InsertFromDefer(), Com_DPrintf(), Com_Printf(), cs_began, cs_spawning, DEBUG_SERVER, serverInstanceStatic_t::ge, client_s::name, client_s::player, serverInstanceStatic_t::serverMutex, client_s::state, SV_DropClient(), SV_SetClientState(), and svs.
static void SV_Disconnect_f | ( | client_t * | cl | ) | [static] |
The client is going to disconnect, so remove the connection immediately.
Definition at line 166 of file sv_user.c.
References SV_DropClient().
The current net_message is parsed for the given client.
Definition at line 227 of file sv_user.c.
References clc_action, clc_endround, clc_initactorstates, clc_nop, clc_stringcmd, clc_teaminfo, clc_userinfo, Com_DPrintf(), Com_Printf(), cs_free, DEBUG_SERVER, serverInstanceStatic_t::ge, serverInstanceGame_t::messageBuffer, NET_ReadString(), client_s::player, serverInstanceStatic_t::serverMutex, client_s::state, sv, SV_DropClient(), SV_ExecuteUserCommand(), SV_UserinfoChanged(), svs, and client_s::userinfo.
Referenced by SV_ReadPacket().
static void SV_ExecuteUserCommand | ( | client_t * | cl, | |
const char * | s | |||
) | [static] |
Definition at line 203 of file sv_user.c.
References Cmd_Argv(), Cmd_TokenizeString(), Com_DPrintf(), Com_ServerState(), DEBUG_SERVER, ucmd_t::func, serverInstanceStatic_t::ge, ucmd_t::name, client_s::player, qfalse, serverInstanceStatic_t::serverMutex, ss_game, and svs.
Referenced by SV_ExecuteClientMessage().
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.
Definition at line 55 of file sv_user.c.
References Com_DPrintf(), Com_Printf(), Com_ServerState(), cs_connected, CS_NAME, cs_spawning, DEBUG_SERVER, i, MAX_CONFIGSTRINGS, client_s::name, NET_WriteByte(), NET_WriteLong(), NET_WriteMsg(), NET_WriteShort(), NET_WriteString(), new_dbuffer(), PROTOCOL_VERSION, 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, | |
int | state | |||
) |
Set the client state.
Definition at line 35 of file sv_user.c.
References Com_DPrintf(), DEBUG_SERVER, client_s::name, and client_s::state.
Referenced by SV_Begin_f(), SV_DropClient(), SV_Map(), SV_New_f(), SV_Spawn_f(), and SVC_DirectConnect().
static void SV_ShowServerinfo_f | ( | client_t * | cl | ) | [static] |
Dumps the serverinfo info string.
Definition at line 175 of file sv_user.c.
References Cvar_Serverinfo(), and Info_Print().
static void SV_Spawn_f | ( | client_t * | cl | ) | [static] |
Definition at line 144 of file sv_user.c.
References Cbuf_InsertFromDefer(), Com_DPrintf(), cs_began, cs_spawned, DEBUG_SERVER, serverInstanceStatic_t::ge, client_s::name, client_s::player, serverInstanceStatic_t::serverMutex, client_s::state, SV_DropClient(), SV_SetClientState(), and svs.
{ {"new", SV_New_f}, {"begin", SV_Begin_f}, {"spawn", SV_Spawn_f}, {"disconnect", SV_Disconnect_f}, {"info", SV_ShowServerinfo_f}, {NULL, NULL} }