summaryrefslogtreecommitdiff
path: root/src/game/g_admin.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/g_admin.c')
-rw-r--r--src/game/g_admin.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/game/g_admin.c b/src/game/g_admin.c
index 817c4ba..7aa972f 100644
--- a/src/game/g_admin.c
+++ b/src/game/g_admin.c
@@ -1281,7 +1281,7 @@ int G_admin_level( gentity_t *ent )
if( !ent )
{
- return MAX_ADMIN_LEVELS;
+ return MAX_ADMIN_LEVEL + 1;
}
for( i = 0; i < MAX_ADMIN_ADMINS && g_admin_admins[ i ]; i++ )
@@ -2126,6 +2126,11 @@ qboolean G_admin_readconfig( gentity_t *ent, int skiparg )
if( !Q_stricmp( t, "level" ) )
{
admin_readconfig_int( &cnf, &l->level );
+ if( l->level > MAX_ADMIN_LEVEL )
+ {
+ ADMP( va( "^3!readconfig: ^7admin level %d too high\n", l->level) );
+ l->level = MAX_ADMIN_LEVEL;
+ }
}
else if( !Q_stricmp( t, "name" ) )
{