Server commands. More...
#include "g_local.h"
Go to the source code of this file.
Data Structures | |
struct | ipfilter_t |
PACKET FILTERING. More... | |
Defines | |
#define | MAX_IPFILTERS 1024 |
Functions | |
static qboolean | StringToFilter (const char *s, ipfilter_t *f) |
qboolean | SV_FilterPacket (const char *from) |
static void | SVCmd_AddIP_f (void) |
static void | SVCmd_RemoveIP_f (void) |
static void | SVCmd_ListIP_f (void) |
Shows the current ip in the filter list. | |
static void | SVCmd_WriteIP_f (void) |
Store all ips in the current filter list in. | |
static void | SVCmd_AI_Add_f (void) |
Used to add ai opponents to a game. | |
static void | SVCmd_Win_f (void) |
Call the end game function with the given team used to e.g. abort singleplayer games and let the aliens win. | |
void | G_ServerCommand (void) |
ServerCommand will be called when an "sv" command is issued. The game can issue gi.Cmd_Argc() / gi.Cmd_Argv() commands to get the rest of the parameters. | |
Variables | |
static ipfilter_t | ipfilters [MAX_IPFILTERS] |
static int | numipfilters |
Server commands.
Definition in file g_svcmds.c.
#define MAX_IPFILTERS 1024 |
Definition at line 57 of file g_svcmds.c.
Referenced by SVCmd_AddIP_f().
void G_ServerCommand | ( | void | ) |
ServerCommand will be called when an "sv" command is issued. The game can issue gi.Cmd_Argc() / gi.Cmd_Argv() commands to get the rest of the parameters.
Definition at line 325 of file g_svcmds.c.
References game_import_t::Cmd_Argv(), gi, Q_strcasecmp, SVCmd_AddIP_f(), SVCmd_AI_Add_f(), SVCmd_ListIP_f(), SVCmd_RemoveIP_f(), SVCmd_Win_f(), and SVCmd_WriteIP_f().
Referenced by GetGameAPI().
static qboolean StringToFilter | ( | const char * | s, | |
ipfilter_t * | f | |||
) | [static] |
Definition at line 62 of file g_svcmds.c.
References byte, ipfilter_t::compare, G_ClientPrintf(), i, m, ipfilter_t::mask, PRINT_CONSOLE, qfalse, and qtrue.
Referenced by SVCmd_AddIP_f(), and SVCmd_RemoveIP_f().
qboolean SV_FilterPacket | ( | const char * | from | ) |
Definition at line 100 of file g_svcmds.c.
References byte, ipfilter_t::compare, i, cvar_s::integer, m, numipfilters, and sv_filterban.
Referenced by G_ClientConnect().
static void SVCmd_AddIP_f | ( | void | ) | [static] |
Definition at line 133 of file g_svcmds.c.
References game_import_t::Cmd_Argv(), ipfilter_t::compare, gi, i, MAX_IPFILTERS, numipfilters, and StringToFilter().
Referenced by G_ServerCommand().
static void SVCmd_AI_Add_f | ( | void | ) | [static] |
Used to add ai opponents to a game.
Definition at line 234 of file g_svcmds.c.
References AI_CreatePlayer(), game_import_t::Cmd_Argv(), gi, MAX_TEAMS, and TEAM_CIVILIAN.
Referenced by G_ServerCommand().
static void SVCmd_ListIP_f | ( | void | ) | [static] |
Shows the current ip in the filter list.
Definition at line 187 of file g_svcmds.c.
References byte, gi, i, and numipfilters.
Referenced by G_ServerCommand().
static void SVCmd_RemoveIP_f | ( | void | ) | [static] |
Definition at line 160 of file g_svcmds.c.
References game_import_t::Cmd_Argv(), ipfilter_t::compare, f, gi, i, ipfilter_t::mask, numipfilters, and StringToFilter().
Referenced by G_ServerCommand().
static void SVCmd_Win_f | ( | void | ) | [static] |
Call the end game function with the given team used to e.g. abort singleplayer games and let the aliens win.
Definition at line 256 of file g_svcmds.c.
References game_import_t::Cmd_Argv(), G_MatchEndTrigger(), gi, MAX_TEAMS, and TEAM_CIVILIAN.
Referenced by G_ServerCommand().
static void SVCmd_WriteIP_f | ( | void | ) | [static] |
Store all ips in the current filter list in.
Definition at line 202 of file g_svcmds.c.
References byte, Com_sprintf(), f, game_import_t::FS_Gamedir(), gi, i, cvar_s::integer, MAX_OSPATH, name, numipfilters, and sv_filterban.
Referenced by G_ServerCommand().
ipfilter_t ipfilters[MAX_IPFILTERS] [static] |
Definition at line 59 of file g_svcmds.c.
int numipfilters [static] |
Definition at line 60 of file g_svcmds.c.
Referenced by SV_FilterPacket(), SVCmd_AddIP_f(), SVCmd_ListIP_f(), SVCmd_RemoveIP_f(), and SVCmd_WriteIP_f().