summaryrefslogtreecommitdiff
path: root/src/game/g_cmds.c
diff options
context:
space:
mode:
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 9b49010..998cafe 100644
--- a/src/game/g_cmds.c
+++ b/src/game/g_cmds.c
@@ -5326,7 +5326,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 },
@@ -5494,6 +5494,14 @@ void ClientCommand( int clientNum )
"print \"Must be living to use this command\n\"" );
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 );
}