diff options
author | Paweł Redman <pawel.redman@gmail.com> | 2017-04-16 21:07:23 +0200 |
---|---|---|
committer | Paweł Redman <pawel.redman@gmail.com> | 2017-04-18 01:14:59 +0200 |
commit | 5b1432ceacc84de2abfb4cfd0e6c040ab5cb9491 (patch) | |
tree | 465613461078c2060236ab8ff7b8428da23870fe /src/game/g_cmds.c | |
parent | 259c996ebe14cdb52e4a47149ce6c33dbeffa4d3 (diff) |
The Autobahn system.
This commit adds two important things:
* Automatically dropping a player if their score is too low.
* Restricting a player while waiting for a reply from Schachtmeister.
Diffstat (limited to 'src/game/g_cmds.c')
-rw-r--r-- | src/game/g_cmds.c | 10 |
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 ); } |