diff options
author | Paweł Redman <pawel@redman.xyz> | 2017-04-13 11:30:00 +0000 |
---|---|---|
committer | /dev/humancontroller <devhc@example.com> | 2017-04-15 12:06:43 +0200 |
commit | 5ad9e26c3be1f2ebc6cdb340b685aef30ae16db7 (patch) | |
tree | 5ee97c52196122bd8356ad8e09403332e7712fcd /src/game/g_admin.h | |
parent | 45973dc48641365b31475733bce7af9c3b8603a6 (diff) |
import the cQVM game module
replacing the existing one
Diffstat (limited to 'src/game/g_admin.h')
-rw-r--r-- | src/game/g_admin.h | 60 |
1 files changed, 44 insertions, 16 deletions
diff --git a/src/game/g_admin.h b/src/game/g_admin.h index 33103ff..6e6e57a 100644 --- a/src/game/g_admin.h +++ b/src/game/g_admin.h @@ -32,19 +32,24 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #define ADMBP_end() G_admin_buffer_end(ent) #define MAX_ADMIN_LEVELS 32 -#define MAX_ADMIN_ADMINS 1024 +#define MAX_ADMIN_ADMINS 2048 #define MAX_ADMIN_BANS 1024 #define MAX_ADMIN_NAMELOGS 128 #define MAX_ADMIN_NAMELOG_NAMES 5 #define MAX_ADMIN_ADMINLOGS 128 #define MAX_ADMIN_ADMINLOG_ARGS 50 +#define MAX_ADMIN_TKLOGS 64 #define MAX_ADMIN_FLAG_LEN 20 #define MAX_ADMIN_FLAGS 1024 #define MAX_ADMIN_COMMANDS 64 #define MAX_ADMIN_CMD_LEN 20 #define MAX_ADMIN_BAN_REASON 50 + #define MAX_ADMIN_BANSUSPEND_DAYS 14 +#define CHAT_MAXCHAN 10 +#define CHAT_MAXPASS 12 + /* * IMMUNITY - cannot be vote kicked, vote muted * NOCENSORFLOOD - cannot be censored or flood protected @@ -63,14 +68,10 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * SEESFULLLISTPLAYERS - sees all information in !listplayers * DBUILDER - permanent designated builder * STEALTH - uses admin stealth - * SPECIAL - allows some special permissions (unlimited votes etc) - * SPECIALNAME - allows black text in name - * .NOCHAT - mutes a player on connect - * .NOVOTE - disallows voting by a player + * BANIMMUNITY - immune from IP based bans * ALLFLAGS - all flags (including command flags) apply to this player */ - #define ADMF_IMMUNITY "IMMUNITY" #define ADMF_NOCENSORFLOOD "NOCENSORFLOOD" #define ADMF_TEAMCHANGEFREE "TEAMCHANGEFREE" @@ -92,14 +93,12 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #define ADMF_BAN_IMMUNITY "BANIMMUNITY" -#define ADMF_SPECIAL "SPECIAL" -#define ADMF_SPECIALNAME "SPECIALNAME" - #define ADMF_NO_CHAT ".NOCHAT" #define ADMF_NO_VOTE ".NOVOTE" #define MAX_ADMIN_LISTITEMS 20 #define MAX_ADMIN_SHOWBANS 10 + #define MAX_ADMIN_MAPLOG_LENGTH 5 // important note: QVM does not seem to allow a single char to be a @@ -129,6 +128,8 @@ typedef struct g_admin_admin int level; char flags[ MAX_ADMIN_FLAGS ]; int seen; + char chat[ CHAT_MAXCHAN ][ CHAT_MAXPASS ]; + int karma; } g_admin_admin_t; @@ -168,7 +169,6 @@ typedef struct g_admin_namelog int denyHumanWeapons; int denyAlienClasses; int specExpires; - int voteCount; } g_admin_namelog_t; @@ -184,6 +184,19 @@ typedef struct g_admin_adminlog } g_admin_adminlog_t; +typedef struct g_admin_tklog +{ + char name[ MAX_NAME_LENGTH ]; + char victim[ MAX_NAME_LENGTH ]; + int id; + int time; + int damage; + int value; + int team; + int weapon; +} +g_admin_tklog_t; + qboolean G_admin_ban_check( char *userinfo, char *reason, int rlen ); qboolean G_admin_cmd_check( gentity_t *ent, qboolean say ); qboolean G_admin_readconfig( gentity_t *ent, int skiparg ); @@ -195,24 +208,31 @@ int G_admin_level( gentity_t *ent ); void G_admin_set_adminname( gentity_t *ent ); char* G_admin_adminPrintName( gentity_t *ent ); -qboolean G_admin_seen(gentity_t *ent, int skiparg ); -void G_admin_seen_update( char *guid ); +void G_admin_chat_writeconfig( void ); +qboolean G_admin_chat_readconfig( gentity_t *ent ); +void G_admin_chat_sync( gentity_t *ent ); +void G_admin_chat_update( gentity_t *ent, int chan ); // ! command functions qboolean G_admin_time( gentity_t *ent, int skiparg ); qboolean G_admin_setlevel( gentity_t *ent, int skiparg ); -qboolean G_admin_flaglist( gentity_t *ent, int skiparg ); -qboolean G_admin_flag( gentity_t *ent, int skiparg ); qboolean G_admin_kick( gentity_t *ent, int skiparg ); qboolean G_admin_adjustban( gentity_t *ent, int skiparg ); qboolean G_admin_subnetban( gentity_t *ent, int skiparg ); qboolean G_admin_suspendban( gentity_t *ent, int skiparg ); qboolean G_admin_ban( gentity_t *ent, int skiparg ); qboolean G_admin_unban( gentity_t *ent, int skiparg ); +qboolean G_admin_seen(gentity_t *ent, int skiparg ); +void G_admin_karma_sync( void ); +void G_admin_seen_update( gclient_t *client, qboolean disconnect ); +qboolean G_admin_expire( gentity_t *ent, int skiparg ); qboolean G_admin_putteam( gentity_t *ent, int skiparg ); qboolean G_admin_adminlog( gentity_t *ent, int skiparg ); void G_admin_adminlog_cleanup( void ); void G_admin_adminlog_log( gentity_t *ent, char *command, char *args, int skiparg, qboolean success ); +qboolean G_admin_tklog( gentity_t *ent, int skiparg ); +void G_admin_tklog_cleanup( void ); +void G_admin_tklog_log( gentity_t *attacker, gentity_t *victim, int meansOfDeath ); qboolean G_admin_listadmins( gentity_t *ent, int skiparg ); qboolean G_admin_listlayouts( gentity_t *ent, int skiparg ); qboolean G_admin_listplayers( gentity_t *ent, int skiparg ); @@ -237,25 +257,33 @@ qboolean G_admin_spec999( gentity_t *ent, int skiparg ); qboolean G_admin_register( gentity_t *ent, int skiparg ); qboolean G_admin_rename( gentity_t *ent, int skiparg ); qboolean G_admin_restart( gentity_t *ent, int skiparg ); -qboolean G_admin_nobuild( gentity_t *ent, int skiparg ); qboolean G_admin_nextmap( gentity_t *ent, int skiparg ); qboolean G_admin_namelog( gentity_t *ent, int skiparg ); qboolean G_admin_lock( gentity_t *ent, int skiparg ); qboolean G_admin_unlock( gentity_t *ent, int skiparg ); qboolean G_admin_info( gentity_t *ent, int skiparg ); +qboolean G_admin_nobuild(gentity_t *ent, int skiparg ); qboolean G_admin_buildlog( gentity_t *ent, int skiparg ); qboolean G_admin_revert( gentity_t *ent, int skiparg ); +int G_admin_autorevert( gentity_t *ent ); qboolean G_admin_pause( gentity_t *ent, int skiparg ); +qboolean G_admin_practice( gentity_t *ent, int skiparg ); qboolean G_admin_L0( gentity_t *ent, int skiparg ); qboolean G_admin_L1( gentity_t *ent, int skiparg ); +qboolean G_admin_bring( gentity_t *ent, int skiparg ); qboolean G_admin_putmespec( gentity_t *ent, int skiparg ); +qboolean G_admin_outlaw( gentity_t *ent, int skiparg ); qboolean G_admin_warn( gentity_t *ent, int skiparg ); qboolean G_admin_designate( gentity_t *ent, int skiparg ); +qboolean G_admin_flaglist( gentity_t *ent, int skiparg ); +qboolean G_admin_flag( gentity_t *ent, int skiparg ); +qboolean G_admin_immunity( gentity_t *ent, int skiparg ); qboolean G_admin_cp( gentity_t *ent, int skiparg ); +qboolean G_admin_invisible( gentity_t *ent, int skiparg ); qboolean G_admin_slap( gentity_t *ent, int skiparg ); qboolean G_admin_drop( gentity_t *ent, int skiparg ); -qboolean G_admin_invisible( gentity_t *ent, int skiparg ); +qboolean G_admin_bubble( gentity_t *ent, int skiparg ); void G_admin_print( gentity_t *ent, char *m ); void G_admin_buffer_print( gentity_t *ent, char *m ); |