Xonotic
|
#include "ipban.qh"
#include <common/constants.qh>
#include <common/stats.qh>
#include <common/util.qh>
#include <common/weapons/_all.qh>
#include <server/command/banning.qh>
#include <server/main.qh>
Go to the source code of this file.
Macros | |
#define | MAX_IPBAN_URIS (URI_GET_IPBAN_END - URI_GET_IPBAN + 1) |
Functions | |
float | Ban_Delete (float i) |
string | Ban_Enforce (float j, string reason) |
float | Ban_GetClientIP (entity client) |
float | Ban_Insert (string ip, float bantime, string reason, float dosync) |
float | Ban_IsClientBanned (entity client, float idx) |
void | Ban_KickBanClient (entity client, float bantime, float masksize, string reason) |
void | Ban_LoadBans () |
bool | Ban_MaybeEnforceBan (entity client) |
bool | Ban_MaybeEnforceBanOnce (entity client) |
void | Ban_SaveBans () |
void | Ban_View () |
void | OnlineBanList_SendBan (string ip, float bantime, string reason) |
void | OnlineBanList_SendUnban (string ip) |
void | OnlineBanList_Think (entity this) |
void | OnlineBanList_URI_Get_Callback (float id, float status, string data) |
#define MAX_IPBAN_URIS (URI_GET_IPBAN_END - URI_GET_IPBAN + 1) |
Definition at line 31 of file ipban.qc.
Referenced by OnlineBanList_SendBan(), OnlineBanList_SendUnban(), OnlineBanList_Think(), and OnlineBanList_URI_Get_Callback().
Definition at line 286 of file ipban.qc.
References ban_count, ban_expire, ban_ip, Ban_SaveBans(), OnlineBanList_SendUnban(), and strunzone().
Referenced by Ban_Insert(), Ban_LoadBans(), and BanCommand_unban().
Definition at line 478 of file ipban.qc.
References Ban_IsClientBanned(), bprint(), FOREACH_CLIENTSLOT, IS_REAL_CLIENT, and strcat().
Referenced by Ban_Insert().
Definition at line 353 of file ipban.qc.
References ban_idfp, ban_ip1, ban_ip2, ban_ip3, ban_ip4, LABEL, strcat(), string_null, strstrofs, and substring().
Referenced by Ban_IsClientBanned(), and Ban_KickBanClient().
Definition at line 505 of file ipban.qc.
References ban_count, Ban_Delete(), Ban_Enforce(), ban_expire, ban_ip, BAN_MAX, Ban_SaveBans(), ftos(), LOG_INFO, LOG_TRACE, max(), OnlineBanList_SendBan(), strzone(), substring(), and time.
Referenced by Ban_KickBanClient(), BanCommand_ban(), and OnlineBanList_URI_Get_Callback().
Definition at line 411 of file ipban.qc.
References autocvar_g_banned_list_idmode, ban_count, ban_expire, Ban_GetClientIP(), ban_idfp, ban_ip, ban_ip1, ban_ip2, ban_ip3, ban_ip4, Ban_LoadBans(), ban_loaded, and time.
Referenced by Ban_Enforce(), and Ban_MaybeEnforceBan().
Definition at line 582 of file ipban.qc.
References Ban_GetClientIP(), ban_idfp, Ban_Insert(), ban_ip1, ban_ip2, ban_ip3, ban_ip4, sprint(), strcat(), and string_null.
Referenced by BanCommand_kickban().
void Ban_LoadBans | ( | ) |
Definition at line 305 of file ipban.qc.
References argv(), autocvar_g_banned_list, ban_count, Ban_Delete(), ban_expire, ban_ip, ban_loaded, entity(), OnlineBanList_Think(), setthink, stof(), strzone(), time, and tokenize_console.
Referenced by Ban_IsClientBanned(), and spawnfunc().
Definition at line 451 of file ipban.qc.
References autocvar_g_ban_telluser, Ban_IsClientBanned(), LOG_INFOF, and sprint().
Referenced by Ban_MaybeEnforceBanOnce().
Definition at line 471 of file ipban.qc.
References Ban_MaybeEnforceBan().
Referenced by ClientConnect(), and SV_ParseClientCommand().
void Ban_SaveBans | ( | ) |
Definition at line 263 of file ipban.qc.
References ban_count, ban_expire, ban_ip, ban_loaded, cvar_set(), ftos(), strcat(), strlen(), and time.
Referenced by Ban_Delete(), Ban_Insert(), and Shutdown().
void Ban_View | ( | ) |
Definition at line 328 of file ipban.qc.
References ban_count, ban_expire, ban_ip, ftos(), LOG_INFO, strcat(), and time.
Referenced by BanCommand_banlist().
Definition at line 33 of file ipban.qc.
References argv(), autocvar_g_ban_sync_uri, autocvar_hostname, ftos(), MAX_IPBAN_URIS, strcat(), strstrofs, tokenize_console, and URI_GET_DISCARD.
Referenced by Ban_Insert().
Definition at line 55 of file ipban.qc.
References argv(), autocvar_g_ban_sync_uri, autocvar_hostname, MAX_IPBAN_URIS, strcat(), strstrofs, tokenize_console, and URI_GET_DISCARD.
Referenced by Ban_Delete().
Definition at line 197 of file ipban.qc.
References argv(), autocvar_g_ban_sync_interval, autocvar_g_ban_sync_timeout, autocvar_g_ban_sync_trusted_servers, autocvar_g_ban_sync_uri, autocvar_hostname, max(), MAX_IPBAN_URIS, nextthink, OnlineBanList_RequestWaiting, OnlineBanList_Servers, OnlineBanList_Timeout, strcat(), strcpy, strstrofs, time, tokenize_console, and URI_GET_IPBAN.
Referenced by Ban_LoadBans().
Definition at line 79 of file ipban.qc.
References argv(), autocvar_g_ban_sync_interval, autocvar_g_ban_sync_timeout, autocvar_g_ban_sync_trusted_servers_verify, autocvar_g_ban_sync_uri, Ban_Insert(), ftos(), LABEL, LOG_INFO, LOG_TRACE, MAX_IPBAN_URIS, min(), OnlineBanList_RequestWaiting, OnlineBanList_Servers, OnlineBanList_Timeout, stof(), strcat(), strlen(), strstrofs, substring(), time, tokenize_console, tokenizebyseparator, and URI_GET_IPBAN.
Referenced by URI_Get_Callback().
float ban_count |
Definition at line 255 of file ipban.qc.
Referenced by Ban_Delete(), Ban_Insert(), Ban_IsClientBanned(), Ban_LoadBans(), Ban_SaveBans(), and Ban_View().
Definition at line 254 of file ipban.qc.
Referenced by Ban_Delete(), Ban_Insert(), Ban_IsClientBanned(), Ban_LoadBans(), Ban_SaveBans(), and Ban_View().
string ban_idfp |
Definition at line 261 of file ipban.qc.
Referenced by Ban_GetClientIP(), Ban_IsClientBanned(), and Ban_KickBanClient().
Definition at line 253 of file ipban.qc.
Referenced by Ban_Delete(), Ban_Insert(), Ban_IsClientBanned(), Ban_LoadBans(), Ban_SaveBans(), and Ban_View().
string ban_ip1 |
Definition at line 257 of file ipban.qc.
Referenced by Ban_GetClientIP(), Ban_IsClientBanned(), and Ban_KickBanClient().
string ban_ip2 |
Definition at line 258 of file ipban.qc.
Referenced by Ban_GetClientIP(), Ban_IsClientBanned(), and Ban_KickBanClient().
string ban_ip3 |
Definition at line 259 of file ipban.qc.
Referenced by Ban_GetClientIP(), Ban_IsClientBanned(), and Ban_KickBanClient().
string ban_ip4 |
Definition at line 260 of file ipban.qc.
Referenced by Ban_GetClientIP(), Ban_IsClientBanned(), and Ban_KickBanClient().
float ban_loaded |
Definition at line 252 of file ipban.qc.
Referenced by Ban_IsClientBanned(), Ban_LoadBans(), and Ban_SaveBans().
const float BAN_MAX = 256 |
Definition at line 251 of file ipban.qc.
Referenced by Ban_Insert().
float OnlineBanList_RequestWaiting[MAX_IPBAN_URIS] |
Definition at line 77 of file ipban.qc.
Referenced by OnlineBanList_Think(), and OnlineBanList_URI_Get_Callback().
string OnlineBanList_Servers |
Definition at line 75 of file ipban.qc.
Referenced by OnlineBanList_Think(), and OnlineBanList_URI_Get_Callback().
float OnlineBanList_Timeout |
Definition at line 76 of file ipban.qc.
Referenced by OnlineBanList_Think(), and OnlineBanList_URI_Get_Callback().