diff options
| author | kai <kai@zittrig.eu> | 2020-04-28 15:01:33 +0100 | 
|---|---|---|
| committer | kai <kai@zittrig.eu> | 2020-04-28 15:01:33 +0100 | 
| commit | 0e50539c38666b2741c0ad10d9e5409de2cae4f0 (patch) | |
| tree | b04ef27877a8f06984aa1fe1dc2811a55ca9db07 /src/game | |
| parent | 7d8054f7d031ab27717c2f395cbedec509c13f16 (diff) | |
allow admins of a higher level to votekick those below
Diffstat (limited to 'src/game')
| -rw-r--r-- | src/game/g_cmds.c | 14 | 
1 files changed, 7 insertions, 7 deletions
diff --git a/src/game/g_cmds.c b/src/game/g_cmds.c index 35f2198..dda123b 100644 --- a/src/game/g_cmds.c +++ b/src/game/g_cmds.c @@ -1698,7 +1698,7 @@ void Cmd_CallVote_f( gentity_t *ent )        Q_strncpyz( name, level.clients[ clientNum ].pers.netname,          sizeof( name ) );        Q_CleanStr( name ); -      if ( G_admin_permission ( &g_entities[ clientNum ], ADMF_IMMUNITY ) ) +      if ( G_admin_permission ( &g_entities[ clientNum ], ADMF_IMMUNITY ) && g_entities[ clientNum ].client->pers.adminLevel >= ent->client->pers.adminLevel )        {      char reasonprint[ MAX_STRING_CHARS ] = ""; @@ -1721,7 +1721,7 @@ void Cmd_CallVote_f( gentity_t *ent )    {      char n1[ MAX_NAME_LENGTH ]; -    if( G_admin_permission( &g_entities[ clientNum ], ADMF_IMMUNITY ) ) +    if( G_admin_permission( &g_entities[ clientNum ], ADMF_IMMUNITY ) && g_entities[ clientNum ].client->pers.adminLevel >= ent->client->pers.adminLevel )      {        trap_SendServerCommand( ent-g_entities,          "print \"callvote: admin is immune from vote kick\n\"" ); @@ -1745,7 +1745,7 @@ void Cmd_CallVote_f( gentity_t *ent )    }    else if( !Q_stricmp( arg1, "spec" ) )    { -    if( G_admin_permission( &g_entities[ clientNum ], ADMF_IMMUNITY ) ) +    if( G_admin_permission( &g_entities[ clientNum ], ADMF_IMMUNITY ) && g_entities[ clientNum ].client->pers.adminLevel >= ent->client->pers.adminLevel )      {            trap_SendServerCommand( ent-g_entities, "print \"callvote: admin is immune from vote spec\n\"" );            return; @@ -1763,7 +1763,7 @@ void Cmd_CallVote_f( gentity_t *ent )        return;      } -    if( G_admin_permission( &g_entities[ clientNum ], ADMF_IMMUNITY ) ) +    if( G_admin_permission( &g_entities[ clientNum ], ADMF_IMMUNITY ) && g_entities[ clientNum ].client->pers.adminLevel >= ent->client->pers.adminLevel )      {        trap_SendServerCommand( ent-g_entities,          "print \"callvote: admin is immune from vote mute\n\"" ); @@ -2359,7 +2359,7 @@ void Cmd_CallTeamVote_f( gentity_t *ent )        Q_strncpyz( name, level.clients[ clientNum ].pers.netname,          sizeof( name ) );        Q_CleanStr( name ); -      if( G_admin_permission( &g_entities[ clientNum ], ADMF_IMMUNITY ) ) +      if( G_admin_permission( &g_entities[ clientNum ], ADMF_IMMUNITY ) && g_entities[ clientNum ].client->pers.adminLevel >= ent->client->pers.adminLevel )        {          char reasonprint[ MAX_STRING_CHARS ] = {0}; @@ -2382,7 +2382,7 @@ void Cmd_CallTeamVote_f( gentity_t *ent )    {      char n1[ MAX_NAME_LENGTH ]; -    if( G_admin_permission( &g_entities[ clientNum ], ADMF_IMMUNITY ) ) +    if( G_admin_permission( &g_entities[ clientNum ], ADMF_IMMUNITY ) && g_entities[ clientNum ].client->pers.adminLevel >= ent->client->pers.adminLevel )      {        trap_SendServerCommand( ent-g_entities,          "print \"callteamvote: admin is immune from vote kick\n\"" ); @@ -2418,7 +2418,7 @@ void Cmd_CallTeamVote_f( gentity_t *ent )        return;      } -    if( G_admin_permission( &g_entities[ clientNum ], ADMF_IMMUNITY ) ) +    if( G_admin_permission( &g_entities[ clientNum ], ADMF_IMMUNITY ) && g_entities[ clientNum ].client->pers.adminLevel >= ent->client->pers.adminLevel )      {        trap_SendServerCommand( ent-g_entities,          "print \"callteamvote: admin is immune from denybuild\n\"" );  | 
