Xonotic
banning.qh File Reference
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define GET_BAN_ARG(v, d)   if (argc > reason_arg) { if ((v = stof(argv(reason_arg))) != 0) ++reason_arg; else v = d; } else { v = d; }
 
#define GET_BAN_REASON(v, d)   if (argc > reason_arg) v = substring(command, argv_start_index(reason_arg), strlen(command) - argv_start_index(reason_arg)); else v = d;
 

Functions

void BanCommand_macro_help ()
 
float BanCommand_macro_usage (int argc)
 
void BanCommand_macro_write_aliases (float fh)
 

Variables

float autocvar_g_ban_default_bantime
 
float autocvar_g_ban_default_masksize
 
float autocvar_g_ban_sync_interval
 
float autocvar_g_ban_sync_timeout
 
string autocvar_g_ban_sync_trusted_servers
 
bool autocvar_g_ban_sync_trusted_servers_verify
 
string autocvar_g_ban_sync_uri
 
bool autocvar_g_ban_telluser = true
 
string autocvar_g_banned_list
 
bool autocvar_g_banned_list_idmode
 

Macro Definition Documentation

◆ GET_BAN_ARG

#define GET_BAN_ARG (   v,
 
)    if (argc > reason_arg) { if ((v = stof(argv(reason_arg))) != 0) ++reason_arg; else v = d; } else { v = d; }

Definition at line 14 of file banning.qh.

Referenced by BanCommand_ban(), and BanCommand_kickban().

◆ GET_BAN_REASON

#define GET_BAN_REASON (   v,
 
)    if (argc > reason_arg) v = substring(command, argv_start_index(reason_arg), strlen(command) - argv_start_index(reason_arg)); else v = d;

Definition at line 15 of file banning.qh.

Referenced by BanCommand_ban(), and BanCommand_kickban().

Function Documentation

◆ BanCommand_macro_help()

void BanCommand_macro_help ( )

Definition at line 276 of file banning.qc.

References BAN_COMMANDS.

Referenced by GameCommand().

277 {
278  #define BAN_COMMAND(name, function, description) \
279  { if (strtolower(description) != "") { LOG_INFO(" ^2", name, "^7: ", description); } }
280 
281  BAN_COMMANDS(0, 0, "");
282 #undef BAN_COMMAND
283 }
#define BAN_COMMANDS(request, arguments, command)
Definition: banning.qc:267
+ Here is the caller graph for this function:

◆ BanCommand_macro_usage()

float BanCommand_macro_usage ( int  argc)

Definition at line 296 of file banning.qc.

References BAN_COMMANDS, and CMD_REQUEST_USAGE.

Referenced by GameCommand().

297 {
298  #define BAN_COMMAND(name, function, description) \
299  { if (name == strtolower(argv(1))) { function; return true; } }
300 
301  BAN_COMMANDS(CMD_REQUEST_USAGE, argc, "");
302 #undef BAN_COMMAND
303 
304  return false;
305 }
const int CMD_REQUEST_USAGE
Definition: command.qh:4
#define BAN_COMMANDS(request, arguments, command)
Definition: banning.qc:267
+ Here is the caller graph for this function:

◆ BanCommand_macro_write_aliases()

void BanCommand_macro_write_aliases ( float  fh)

Definition at line 307 of file banning.qc.

References BAN_COMMANDS.

Referenced by GENERIC_COMMAND().

308 {
309  #define BAN_COMMAND(name, function, description) \
310  { if (strtolower(description) != "") { CMD_Write_Alias("qc_cmd_sv", name, description); } }
311 
312  BAN_COMMANDS(0, 0, "");
313 #undef BAN_COMMAND
314 }
#define BAN_COMMANDS(request, arguments, command)
Definition: banning.qc:267
+ Here is the caller graph for this function:

Variable Documentation

◆ autocvar_g_ban_default_bantime

float autocvar_g_ban_default_bantime

Definition at line 3 of file banning.qh.

Referenced by BanCommand_ban(), BanCommand_kickban(), and VoteCommand_parse().

◆ autocvar_g_ban_default_masksize

float autocvar_g_ban_default_masksize

Definition at line 4 of file banning.qh.

Referenced by BanCommand_kickban(), and VoteCommand_parse().

◆ autocvar_g_ban_sync_interval

float autocvar_g_ban_sync_interval

Definition at line 5 of file banning.qh.

Referenced by OnlineBanList_Think(), and OnlineBanList_URI_Get_Callback().

◆ autocvar_g_ban_sync_timeout

float autocvar_g_ban_sync_timeout

Definition at line 6 of file banning.qh.

Referenced by OnlineBanList_Think(), and OnlineBanList_URI_Get_Callback().

◆ autocvar_g_ban_sync_trusted_servers

string autocvar_g_ban_sync_trusted_servers

Definition at line 7 of file banning.qh.

Referenced by OnlineBanList_Think().

◆ autocvar_g_ban_sync_trusted_servers_verify

bool autocvar_g_ban_sync_trusted_servers_verify

Definition at line 8 of file banning.qh.

Referenced by OnlineBanList_URI_Get_Callback().

◆ autocvar_g_ban_sync_uri

string autocvar_g_ban_sync_uri

◆ autocvar_g_ban_telluser

bool autocvar_g_ban_telluser = true

Definition at line 10 of file banning.qh.

Referenced by Ban_MaybeEnforceBan().

◆ autocvar_g_banned_list

string autocvar_g_banned_list

Definition at line 11 of file banning.qh.

Referenced by Ban_LoadBans().

◆ autocvar_g_banned_list_idmode

bool autocvar_g_banned_list_idmode

Definition at line 12 of file banning.qh.

Referenced by Ban_IsClientBanned().