summaryrefslogtreecommitdiff
path: root/src/game/g_cmds.c
diff options
context:
space:
mode:
authorIronClawTrem <louie.nutman@gmail.com>2019-11-01 23:02:33 +0000
committerIronClawTrem <louie.nutman@gmail.com>2019-11-01 23:02:33 +0000
commite136b8c5d070d14721585263b41a325794030f7d (patch)
tree010b119af44bc31ad15feafd9897d244c6804509 /src/game/g_cmds.c
parent3235a157fc8511c91008c9f5119775685443f338 (diff)
schachtmeister and autobahn implementation
Diffstat (limited to 'src/game/g_cmds.c')
-rw-r--r--src/game/g_cmds.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/game/g_cmds.c b/src/game/g_cmds.c
index e4f6ad7..c380b45 100644
--- a/src/game/g_cmds.c
+++ b/src/game/g_cmds.c
@@ -5081,7 +5081,7 @@ static void Cmd_Ignore_f( gentity_t *ent )
commands_t cmds[ ] = {
// normal commands
{ "team", 0, Cmd_Team_f },
- { "vote", CMD_INTERMISSION, Cmd_Vote_f },
+ { "vote", CMD_MESSAGE|CMD_INTERMISSION, Cmd_Vote_f },
{ "ignore", 0, Cmd_Ignore_f },
{ "unignore", 0, Cmd_Ignore_f },
@@ -5239,6 +5239,14 @@ void ClientCommand( int clientNum )
return;
}
+ // Disallow a large class of commands if a player is restricted.
+ if( G_admin_is_restricted( ent, qtrue ) &&
+ ( !Q_stricmp( cmd, "team" ) ||
+ ( cmds[ i ].cmdFlags & ( CMD_MESSAGE | CMD_TEAM | CMD_NOTEAM ) ) ) )
+ {
+ return;
+ }
+
cmds[ i ].cmdHandler( ent );
}