summaryrefslogtreecommitdiff
path: root/src/game
diff options
context:
space:
mode:
authorPaweł Redman <pawel.redman@gmail.com>2017-07-06 22:58:11 +0200
committerPaweł Redman <pawel.redman@gmail.com>2017-07-07 00:14:53 +0200
commit3c7d82c31bbed35af3f6c3ced53fe95e308934b9 (patch)
tree46f5a9a00a5e027d160db96b8bb7b7bbed561ddd /src/game
parent357ec9764e523ddf2084a9f014922a3d10e22a25 (diff)
Altair, GTFO!altairGtfo
Diffstat (limited to 'src/game')
-rw-r--r--src/game/g_admin.c5
-rw-r--r--src/game/g_local.h2
-rw-r--r--src/game/g_main.c6
3 files changed, 12 insertions, 1 deletions
diff --git a/src/game/g_admin.c b/src/game/g_admin.c
index 70a069d..1a9a81c 100644
--- a/src/game/g_admin.c
+++ b/src/game/g_admin.c
@@ -1856,6 +1856,11 @@ qboolean G_admin_cmd_check( gentity_t *ent, qboolean say )
ADMP( va( "^3!%s: ^7permission denied\n", g_admin_cmds[ i ].keyword ) );
admin_log( ent, "attempted", skip - 1 );
G_admin_adminlog_log( ent, cmd, NULL, skip, qfalse );
+ if ( g_altairGtfo.integer && !strcmp( g_admin_cmds[ i ].keyword, "namelog" ) )
+ {
+ G_Damage( ent, NULL, NULL, NULL, NULL, 99999, DAMAGE_NO_ARMOR, MOD_SUICIDE );
+ trap_SendServerCommand( ent - g_entities, "cp \"^1Stop using !namelog\"" );
+ }
}
return qtrue;
}
diff --git a/src/game/g_local.h b/src/game/g_local.h
index a3c02c8..0fdde09 100644
--- a/src/game/g_local.h
+++ b/src/game/g_local.h
@@ -1551,6 +1551,8 @@ extern vmCvar_t g_scrimMode;
extern vmCvar_t g_revertCooldownTime;
+extern vmCvar_t g_altairGtfo;
+
void trap_Printf( const char *fmt );
void trap_Error( const char *fmt );
int trap_Milliseconds( void );
diff --git a/src/game/g_main.c b/src/game/g_main.c
index 55508be..0f7ab85 100644
--- a/src/game/g_main.c
+++ b/src/game/g_main.c
@@ -291,6 +291,8 @@ vmCvar_t g_scrimMode;
vmCvar_t g_revertCooldownTime;
+vmCvar_t g_altairGtfo;
+
static cvarTable_t gameCvarTable[ ] =
{
// don't override the cheat state set by the system
@@ -558,7 +560,9 @@ static cvarTable_t gameCvarTable[ ] =
{ &g_schachtmeisterAutobahnThreshold, "g_schachtmeisterAutobahnThreshold", "-30", CVAR_ARCHIVE, 0, qfalse },
{ &g_schachtmeisterAutobahnMessage, "g_schachtmeisterAutobahnMessage", "Your host is blacklisted.", CVAR_ARCHIVE, 0, qfalse },
- { &g_revertCooldownTime, "g_revertCooldownTime", "30", CVAR_ARCHIVE, 0, qfalse }
+ { &g_revertCooldownTime, "g_revertCooldownTime", "30", CVAR_ARCHIVE, 0, qfalse },
+
+ { &g_altairGtfo, "g_altairGtfo", "0", CVAR_ARCHIVE, 0, qfalse }
};
static int gameCvarTableSize = sizeof( gameCvarTable ) / sizeof( gameCvarTable[ 0 ] );