diff options
author | Ben Millwood <thebenmachine@gmail.com> | 2009-12-04 13:40:12 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2013-01-03 00:17:23 +0000 |
commit | 27c26322272a10df75b28efd24e552d0a5e5cff0 (patch) | |
tree | 891a8c52f1a833bccad1324cbbf01c144cbc04c8 /src/game | |
parent | 4d20657f114f0a5973bbbb1c0d23c885208682ca (diff) |
* Set a->level properly in admin_default_levels (Rezyn)
Diffstat (limited to 'src/game')
-rw-r--r-- | src/game/g_admin.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/game/g_admin.c b/src/game/g_admin.c index 83338ee7..300e551c 100644 --- a/src/game/g_admin.c +++ b/src/game/g_admin.c @@ -592,31 +592,39 @@ static void admin_readconfig_int( char **cnf, int *v ) // ones to make new installs easier for admins static void admin_default_levels( void ) { - g_admin_level_t *l = g_admin_levels = BG_Alloc( sizeof( g_admin_level_t ) ); + g_admin_level_t *l; + int level = 0; + + l = g_admin_levels = BG_Alloc( sizeof( g_admin_level_t ) ); + l->level = level++; Q_strncpyz( l->name, "^4Unknown Player", sizeof( l->name ) ); Q_strncpyz( l->flags, "listplayers admintest adminhelp time", sizeof( l->flags ) ); - l->next = BG_Alloc( sizeof( g_admin_level_t ) ); + l = l->next = BG_Alloc( sizeof( g_admin_level_t ) ); + l->level = level++; Q_strncpyz( l->name, "^5Server Regular", sizeof( l->name ) ); Q_strncpyz( l->flags, "listplayers admintest adminhelp time", sizeof( l->flags ) ); l = l->next = BG_Alloc( sizeof( g_admin_level_t ) ); + l->level = level++; Q_strncpyz( l->name, "^6Team Manager", sizeof( l->name ) ); Q_strncpyz( l->flags, "listplayers admintest adminhelp time putteam spec999", sizeof( l->flags ) ); l = l->next = BG_Alloc( sizeof( g_admin_level_t ) ); + l->level = level++; Q_strncpyz( l->name, "^2Junior Admin", sizeof( l->name ) ); Q_strncpyz( l->flags, "listplayers admintest adminhelp time putteam spec999 kick mute ADMINCHAT", sizeof( l->flags ) ); l = l->next = BG_Alloc( sizeof( g_admin_level_t ) ); + l->level = level++; Q_strncpyz( l->name, "^3Senior Admin", sizeof( l->name ) ); Q_strncpyz( l->flags, "listplayers admintest adminhelp time putteam spec99 kick mute showbans ban " @@ -624,6 +632,7 @@ static void admin_default_levels( void ) sizeof( l->flags ) ); l = l->next = BG_Alloc( sizeof( g_admin_level_t ) ); + l->level = level++; Q_strncpyz( l->name, "^1Server Operator", sizeof( l->name ) ); Q_strncpyz( l->flags, "ALLFLAGS -IMMUTABLE -INCOGNITO", |