Re: [CODE] Multiple olc permissions with ascii pfiles

From: Zeavon (
Date: 03/12/00

On Sat, 11 Mar 2000, Josh Anderson wrote:

> I've been looking through the mailing list and found some code for having
> your builders have multiple permission settings so they can build in more
> than one zone.  (I'm using bpl16 with Oasis.)  However, that still only

The way I did it was to store the permissions of who can edit the zone in
each zone. Thus, the player data never contains that information and no
need to pfile conversions.

What I did was add "char *owners;" to the the zone structure and treated
it just like you do the keyword list on an object. I added a part to zedit
that only level 58+ can alter (top end is 60). Levels 58+ can edit ANY
zone they please.

In zedit there is a menu like so:
O) Owners       : Zeavon Shiarna Dopin Lazarus

In olc.c, I have the following function:
bool can_alter_vnum(char_data *ch, long vnum)
  int zone = real_zone(vnum);

  if (zone == -1) {
    send_to_charf(ch, "The zone for vnum #%ld does not exist.\r\n", vnum);
    return false;

  // LVL_MED_GOD can edit any zone they want to
  if (GET_LEVEL(ch) >= LVL_MED_GOD)
    return true;

  if (isname(GET_NAME(ch), zone_table[zone].owners))
    return true;

  send_to_charf(ch, "You do not have permission to edit zone #%d.\r\n",
  return false;

in do_olc I have the following code put in once I have determined the
vnum of the thing that they are trying to edit:
  if (!can_alter_vnum(ch, number)) {

Zeavon Calatin, MageMaster of the Realms
Spear of Insanity    telnet://

     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  |

This archive was generated by hypermail 2b30 : 04/10/01 PDT