summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkai <kai@zittrig.eu>2020-04-28 15:01:33 +0100
committerkai <kai@zittrig.eu>2020-04-28 15:01:33 +0100
commit0e50539c38666b2741c0ad10d9e5409de2cae4f0 (patch)
treeb04ef27877a8f06984aa1fe1dc2811a55ca9db07
parent7d8054f7d031ab27717c2f395cbedec509c13f16 (diff)
allow admins of a higher level to votekick those below
-rw-r--r--src/game/g_cmds.c14
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\"" );