UFO: Alien Invasion
|
Console-only server commands. More...
Go to the source code of this file.
Data Structures | |
struct | serverCommand_t |
List for SV_CompleteServerCommand. More... | |
Functions | |
void | SV_Heartbeat_f (void) |
void | SV_SetMaster_f (void) |
Add the server to the master server list so that others can see the server in the server list. More... | |
static client_t * | SV_GetPlayerClientStructure (const char *s) |
searches a player by id or name More... | |
bool | SV_CheckMap (const char *map, const char *assembly) |
Checks whether a map exists. More... | |
static void | SV_Map_f (void) |
Goes directly to a given map. More... | |
static void | SV_Kick_f (void) |
Kick a user off of the server. More... | |
static void | SV_StartGame_f (void) |
Forces a game start even if not all players are ready yet. More... | |
static void | SV_Status_f (void) |
Prints some server info to the game console - like connected players and current running map. More... | |
static void | SV_Serverinfo_f (void) |
Examine or change the serverinfo string. More... | |
static void | SV_UserInfo_f (void) |
Examine all a users info strings. More... | |
static void | SV_KillServer_f (void) |
Kick everyone off, possibly in preparation for a new game. More... | |
static void | SV_ServerCommand_f (void) |
Let the game dll handle a command. More... | |
static int | SV_CompleteMapCommand (const char *partial, const char **match) |
Autocomplete function for the map command. More... | |
static void | SV_ListMaps_f (void) |
List all valid maps. More... | |
static int | SV_CompleteServerCommand (const char *partial, const char **match) |
Autocomplete function for server commands. More... | |
static void | SV_PrintConfigStrings_f (void) |
void | SV_InitOperatorCommands (void) |
Variables | |
static serverCommand_t const | serverCommandList [] |
Console-only server commands.
These commands can only be entered from stdin or by a remote operator datagram.
Definition in file sv_ccmds.cpp.
bool SV_CheckMap | ( | const char * | map, |
const char * | assembly | ||
) |
Checks whether a map exists.
Definition at line 101 of file sv_ccmds.cpp.
References Com_Printf(), Com_sprintf(), FS_CheckFile(), and MAX_QPATH.
Referenced by SV_Map_f(), and SV_MapcycleAdd_f().
|
static |
Autocomplete function for the map command.
[in] | partial | The list of params entered, starting at the first non-blank char. |
[out] | match | The found entry of the list we are searching, in case of more than one entry their common suffix is returned. |
Definition at line 390 of file sv_ccmds.cpp.
References Cmd_GenericCompleteFunction(), Com_Printf(), FS_GetMaps(), fs_maps, fs_numInstalledMaps, mapName, Q_strncasecmp, and Q_strncpyz().
Referenced by SV_InitOperatorCommands().
|
static |
Autocomplete function for server commands.
Definition at line 479 of file sv_ccmds.cpp.
References Cmd_GenericCompleteFunction(), Com_Printf(), i, and S_COLOR_GREEN.
Referenced by SV_InitOperatorCommands().
|
static |
searches a player by id or name
[in] | s | Either the numeric id of the player, or the player name |
Definition at line 68 of file sv_ccmds.cpp.
References cl, Cmd_Argv(), Com_Printf(), cs_free, client_s::name, Q_streq, client_s::state, and SV_GetNextClient().
Referenced by SV_Kick_f(), and SV_UserInfo_f().
Definition at line 35 of file sv_ccmds.cpp.
References serverInstanceStatic_s::lastHeartbeat, and svs.
Referenced by SV_InitGame(), SV_InitOperatorCommands(), and SV_SetMaster_f().
Definition at line 542 of file sv_ccmds.cpp.
References Cmd_AddCommand(), Cmd_AddParamCompleteFunction(), SV_CompleteMapCommand(), SV_CompleteServerCommand(), SV_Heartbeat_f(), SV_Kick_f(), SV_KillServer_f(), SV_ListMaps_f(), SV_Map_f(), SV_PrintConfigStrings_f(), SV_ServerCommand_f(), SV_Serverinfo_f(), SV_SetMaster_f(), SV_StartGame_f(), SV_Status_f(), and SV_UserInfo_f().
Referenced by SV_Init().
Kick a user off of the server.
Definition at line 187 of file sv_ccmds.cpp.
References cl, Cmd_Argc(), Cmd_Argv(), Com_Printf(), serverInstanceStatic_s::initialized, client_s::name, PRINT_CONSOLE, SV_BroadcastPrintf(), SV_DropClient(), SV_GetPlayerClientStructure(), and svs.
Referenced by SV_InitOperatorCommands().
Kick everyone off, possibly in preparation for a new game.
Definition at line 354 of file sv_ccmds.cpp.
References serverInstanceStatic_s::initialized, SV_Shutdown(), and svs.
Referenced by SV_InitOperatorCommands().
List all valid maps.
Definition at line 442 of file sv_ccmds.cpp.
References Com_Printf(), FS_GetMaps(), fs_maps, fs_numInstalledMaps, and i.
Referenced by SV_InitOperatorCommands().
Goes directly to a given map.
Definition at line 131 of file sv_ccmds.cpp.
References Cmd_Argc(), Cmd_Argv(), Com_Printf(), Cvar_SetValue(), MAX_TILESTRINGS, MAX_TOKEN_CHARS, Q_streq, Q_strncpyz(), SV_CheckMap(), and SV_Map().
Referenced by SV_InitOperatorCommands().
Definition at line 496 of file sv_ccmds.cpp.
References Com_Printf(), CS_MODELS, CS_POSITIONS, CS_TILES, i, MAX_CONFIGSTRINGS, and SV_GetConfigString().
Referenced by SV_InitOperatorCommands().
Let the game dll handle a command.
Definition at line 364 of file sv_ccmds.cpp.
References Cmd_Argc(), Cmd_Args(), Cmd_Argv(), Com_DPrintf(), Com_Printf(), DEBUG_SERVER, serverInstanceStatic_s::ge, serverInstanceStatic_s::serverMutex, and svs.
Referenced by SV_InitOperatorCommands().
Examine or change the serverinfo string.
Definition at line 316 of file sv_ccmds.cpp.
References Com_Printf(), Cvar_Serverinfo(), Info_Print(), and MAX_INFO_STRING.
Referenced by SV_InitOperatorCommands().
Add the server to the master server list so that others can see the server in the server list.
Definition at line 45 of file sv_ccmds.cpp.
References Com_Printf(), Cvar_Set(), HTTP_GetURL(), cvar_s::integer, masterserver_url, port, cvar_s::string, sv_dedicated, SV_Heartbeat_f(), sv_maxclients, and va().
Referenced by SV_InitGame(), and SV_InitOperatorCommands().
Forces a game start even if not all players are ready yet.
Definition at line 215 of file sv_ccmds.cpp.
References cl, cs_free, Cvar_ForceSet(), client_s::player, SrvPlayer::setReady(), client_s::state, SV_GetNextClient(), and va().
Referenced by SV_InitOperatorCommands().
Prints some server info to the game console - like connected players and current running map.
Definition at line 232 of file sv_ccmds.cpp.
References cl, serverInstanceStatic_s::clients, Com_Printf(), cs_began, cs_connected, cs_free, CS_LIGHTMAP, cs_spawned, cs_spawning, serverInstanceStatic_s::ge, i, SrvPlayer::isReady(), client_s::lastmessage, serverInstanceGame_s::name, client_s::name, NET_StreamPeerToName(), client_s::player, client_s::state, client_s::stream, sv, SV_GetConfigStringInteger(), SV_GetNextClient(), and svs.
Referenced by SV_InitOperatorCommands().
Examine all a users info strings.
Definition at line 328 of file sv_ccmds.cpp.
References cl, Cmd_Argc(), Cmd_Argv(), Com_Printf(), Info_Print(), serverInstanceStatic_s::initialized, SV_GetPlayerClientStructure(), svs, and client_s::userinfo.
Referenced by SV_InitOperatorCommands().
|
static |
Definition at line 460 of file sv_ccmds.cpp.