mirror of
https://github.com/tbamud/tbamud.git
synced 2026-01-22 00:46:09 +01:00
MAJOR UPDATE: Admin Levels split from Mortal Levels
This commit is contained in:
parent
2b30509371
commit
dcba9d6441
77 changed files with 2882 additions and 2067 deletions
22
src/oasis.c
22
src/oasis.c
|
|
@ -205,13 +205,13 @@ void cleanup_olc(struct descriptor_data *d, byte cleanup_type)
|
|||
act("$n stops using OLC.", TRUE, d->character, NULL, NULL, TO_ROOM);
|
||||
|
||||
if (cleanup_type == CLEANUP_CONFIG)
|
||||
mudlog(BRF, LVL_IMMORT, TRUE, "OLC: %s stops editing the game configuration", GET_NAME(d->character));
|
||||
mudlog(BRF, ADMLVL_IMMORT, TRUE, "OLC: %s stops editing the game configuration", GET_NAME(d->character));
|
||||
else if (STATE(d) == CON_TEDIT)
|
||||
mudlog(BRF, LVL_IMMORT, TRUE, "OLC: %s stops editing text files.", GET_NAME(d->character));
|
||||
mudlog(BRF, ADMLVL_IMMORT, TRUE, "OLC: %s stops editing text files.", GET_NAME(d->character));
|
||||
else if (STATE(d) == CON_HEDIT)
|
||||
mudlog(CMP, LVL_IMMORT, TRUE, "OLC: %s stops editing help files.", GET_NAME(d->character));
|
||||
mudlog(CMP, ADMLVL_IMMORT, TRUE, "OLC: %s stops editing help files.", GET_NAME(d->character));
|
||||
else
|
||||
mudlog(CMP, LVL_IMMORT, TRUE, "OLC: %s stops editing zone %d allowed zone %d", GET_NAME(d->character), zone_table[OLC_ZNUM(d)].number, GET_OLC_ZONE(d->character));
|
||||
mudlog(CMP, ADMLVL_IMMORT, TRUE, "OLC: %s stops editing zone %d allowed zone %d", GET_NAME(d->character), zone_table[OLC_ZNUM(d)].number, GET_OLC_ZONE(d->character));
|
||||
|
||||
STATE(d) = CON_PLAYING;
|
||||
}
|
||||
|
|
@ -275,8 +275,8 @@ int can_edit_zone(struct char_data *ch, zone_rnum rnum)
|
|||
if (GET_OLC_ZONE(ch) == AEDIT_PERMISSION && rnum == AEDIT_PERMISSION)
|
||||
return TRUE;
|
||||
|
||||
/* always access if ch is high enough level */
|
||||
if (GET_LEVEL(ch) >= LVL_GRGOD)
|
||||
/* always access if ch is high enough level (Imps don't need ADM_BUILD) */
|
||||
if (IS_ADMIN(ch, ADMLVL_IMPL))
|
||||
return (TRUE);
|
||||
|
||||
/* always access if a player helped build the zone in the first place */
|
||||
|
|
@ -289,9 +289,11 @@ int can_edit_zone(struct char_data *ch, zone_rnum rnum)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
/* no access if you're not at least LVL_BUILDER */
|
||||
if (GET_LEVEL(ch) < LVL_BUILDER)
|
||||
return FALSE;
|
||||
/* no access if you're not at least LVL_BUILDER, or don't have any builder privs */
|
||||
if (GET_ADMLEVEL(ch) < ADMLVL_BUILDER) {
|
||||
if (!ADM_FLAGGED(ch, ADM_BUILD) && !ADM_FLAGGED(ch, ADM_ADVBUILD))
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* always access if you're assigned to this zone */
|
||||
if (real_zone(GET_OLC_ZONE(ch)) == rnum)
|
||||
|
|
@ -311,6 +313,6 @@ void send_cannot_edit(struct char_data *ch, zone_vnum zone)
|
|||
send_to_char(ch, "You do not have permission to edit zone %d.\r\n", zone);
|
||||
sprintf(buf, "OLC: %s tried to edit zone %d.", GET_NAME(ch), zone);
|
||||
}
|
||||
mudlog(BRF, LVL_IMPL, TRUE, "%s", buf);
|
||||
mudlog(BRF, ADMLVL_IMPL, TRUE, "%s", buf);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue