/
lib/banish/
lib/d/
lib/doc/
lib/doc/domains/
lib/doc/efun/
lib/doc/examples/
lib/doc/examples/armour/
lib/doc/examples/contain/
lib/doc/examples/food/
lib/doc/examples/magic/
lib/doc/examples/monster/
lib/doc/examples/room/
lib/doc/examples/weapons/
lib/include/
lib/include/fn_specs/
lib/include/skills/
lib/info/
lib/inherit/base/
lib/log/
lib/manuals/312/
lib/news/
lib/obj/party/
lib/objects/components/
lib/open/
lib/open/library/
lib/open/party/
lib/players/
lib/players/zilanthius/
lib/room/
lib/room/city/arena/
lib/room/city/creator/
lib/room/city/garden/monst/
lib/room/city/obj/
lib/room/city/shop/
lib/room/death/
lib/room/registry/
lib/secure/
lib/secure/UDP_CMD_DIR/
lib/skills/
lib/skills/fighter/
lib/skills/thief/
lib/usr/
lib/usr/creators/
lib/usr/players/
#define NAME "zilanthius"

/*
 * This object allows the wizard to configure his own directory to
 * allow write, and read access to his/her files, and directories.
 *
 * name is the name of the caller, and file is the full pathname.
 *
 * A return of 1 means that 'name' has valid access.
 * A return of 0 means that access is denied unless that person has
 * an appropriate security access.
 *
 * Regardless of access given here, there is always read/write access 
 * to your ~ /open/ files, and only you and admin have access to files
 * in ~ /private/
 *
 */


status valid_write(string file, string name) {
  if(!file) return 0;

  /* example - quite redundant as it is overrided but gives idea */

  if(sscanf(file,"/players/"+NAME+"/open/%s",file)) return 1;
  if(sscanf(file,"/players/"+NAME+"/private/%s", file)) {
    if(name == NAME) return 1;
  }
  return 0;
}

status valid_read(string file, string name) {
  if(!file) return 0;
  if(valid_write(file, name)) return 1; 
  return 0;
}