tmi2_fluffos_v2/
tmi2_fluffos_v2/bin/
tmi2_fluffos_v2/etc/
tmi2_fluffos_v2/fluffos-2.7-ds2.018/
tmi2_fluffos_v2/fluffos-2.7-ds2.018/ChangeLog.old/
tmi2_fluffos_v2/fluffos-2.7-ds2.018/Win32/
tmi2_fluffos_v2/fluffos-2.7-ds2.018/compat/
tmi2_fluffos_v2/fluffos-2.7-ds2.018/compat/simuls/
tmi2_fluffos_v2/fluffos-2.7-ds2.018/include/
tmi2_fluffos_v2/fluffos-2.7-ds2.018/testsuite/
tmi2_fluffos_v2/fluffos-2.7-ds2.018/testsuite/clone/
tmi2_fluffos_v2/fluffos-2.7-ds2.018/testsuite/command/
tmi2_fluffos_v2/fluffos-2.7-ds2.018/testsuite/data/
tmi2_fluffos_v2/fluffos-2.7-ds2.018/testsuite/etc/
tmi2_fluffos_v2/fluffos-2.7-ds2.018/testsuite/include/
tmi2_fluffos_v2/fluffos-2.7-ds2.018/testsuite/inherit/
tmi2_fluffos_v2/fluffos-2.7-ds2.018/testsuite/inherit/master/
tmi2_fluffos_v2/fluffos-2.7-ds2.018/testsuite/log/
tmi2_fluffos_v2/fluffos-2.7-ds2.018/testsuite/single/
tmi2_fluffos_v2/fluffos-2.7-ds2.018/testsuite/single/tests/compiler/
tmi2_fluffos_v2/fluffos-2.7-ds2.018/testsuite/single/tests/efuns/
tmi2_fluffos_v2/fluffos-2.7-ds2.018/testsuite/single/tests/operators/
tmi2_fluffos_v2/fluffos-2.7-ds2.018/testsuite/u/
tmi2_fluffos_v2/fluffos-2.7-ds2.018/tmp/
tmi2_fluffos_v2/fluffos-2.7-ds2.018/windows/
tmi2_fluffos_v2/lib/
tmi2_fluffos_v2/lib/adm/
tmi2_fluffos_v2/lib/adm/daemons/languages/
tmi2_fluffos_v2/lib/adm/daemons/network/I3/
tmi2_fluffos_v2/lib/adm/daemons/virtual/
tmi2_fluffos_v2/lib/adm/daemons/virtual/template/
tmi2_fluffos_v2/lib/adm/news/
tmi2_fluffos_v2/lib/adm/obj/
tmi2_fluffos_v2/lib/adm/obj/master/
tmi2_fluffos_v2/lib/adm/priv/
tmi2_fluffos_v2/lib/adm/shell/
tmi2_fluffos_v2/lib/adm/tmp/
tmi2_fluffos_v2/lib/cmds/
tmi2_fluffos_v2/lib/d/
tmi2_fluffos_v2/lib/d/Conf/
tmi2_fluffos_v2/lib/d/Conf/adm/
tmi2_fluffos_v2/lib/d/Conf/boards/
tmi2_fluffos_v2/lib/d/Conf/cmds/
tmi2_fluffos_v2/lib/d/Conf/data/
tmi2_fluffos_v2/lib/d/Conf/logs/
tmi2_fluffos_v2/lib/d/Conf/obj/
tmi2_fluffos_v2/lib/d/Conf/text/help/
tmi2_fluffos_v2/lib/d/Fooland/adm/
tmi2_fluffos_v2/lib/d/Fooland/data/
tmi2_fluffos_v2/lib/d/Fooland/data/attic/
tmi2_fluffos_v2/lib/d/Fooland/items/
tmi2_fluffos_v2/lib/d/TMI/
tmi2_fluffos_v2/lib/d/TMI/adm/
tmi2_fluffos_v2/lib/d/TMI/boards/
tmi2_fluffos_v2/lib/d/TMI/data/
tmi2_fluffos_v2/lib/d/TMI/rooms/
tmi2_fluffos_v2/lib/d/grid/
tmi2_fluffos_v2/lib/d/grid/adm/
tmi2_fluffos_v2/lib/d/grid/data/
tmi2_fluffos_v2/lib/d/std/
tmi2_fluffos_v2/lib/d/std/adm/
tmi2_fluffos_v2/lib/data/adm/
tmi2_fluffos_v2/lib/data/adm/daemons/
tmi2_fluffos_v2/lib/data/adm/daemons/doc_d/
tmi2_fluffos_v2/lib/data/adm/daemons/emoted/
tmi2_fluffos_v2/lib/data/adm/daemons/network/http/
tmi2_fluffos_v2/lib/data/adm/daemons/network/services/mail_q/
tmi2_fluffos_v2/lib/data/adm/daemons/network/smtp/
tmi2_fluffos_v2/lib/data/adm/daemons/news/archives/
tmi2_fluffos_v2/lib/data/attic/connection/
tmi2_fluffos_v2/lib/data/attic/user/
tmi2_fluffos_v2/lib/data/std/connection/b/
tmi2_fluffos_v2/lib/data/std/connection/l/
tmi2_fluffos_v2/lib/data/std/user/a/
tmi2_fluffos_v2/lib/data/std/user/b/
tmi2_fluffos_v2/lib/data/std/user/d/
tmi2_fluffos_v2/lib/data/std/user/f/
tmi2_fluffos_v2/lib/data/std/user/l/
tmi2_fluffos_v2/lib/data/std/user/x/
tmi2_fluffos_v2/lib/data/u/d/dm/working/doc_d/
tmi2_fluffos_v2/lib/data/u/l/leto/doc_d/
tmi2_fluffos_v2/lib/data/u/l/leto/smtp/
tmi2_fluffos_v2/lib/doc/
tmi2_fluffos_v2/lib/doc/driverdoc/applies/
tmi2_fluffos_v2/lib/doc/driverdoc/applies/interactive/
tmi2_fluffos_v2/lib/doc/driverdoc/concepts/
tmi2_fluffos_v2/lib/doc/driverdoc/driver/
tmi2_fluffos_v2/lib/doc/driverdoc/efuns/arrays/
tmi2_fluffos_v2/lib/doc/driverdoc/efuns/buffers/
tmi2_fluffos_v2/lib/doc/driverdoc/efuns/compile/
tmi2_fluffos_v2/lib/doc/driverdoc/efuns/ed/
tmi2_fluffos_v2/lib/doc/driverdoc/efuns/filesystem/
tmi2_fluffos_v2/lib/doc/driverdoc/efuns/floats/
tmi2_fluffos_v2/lib/doc/driverdoc/efuns/functions/
tmi2_fluffos_v2/lib/doc/driverdoc/efuns/general/
tmi2_fluffos_v2/lib/doc/driverdoc/efuns/mappings/
tmi2_fluffos_v2/lib/doc/driverdoc/efuns/numbers/
tmi2_fluffos_v2/lib/doc/driverdoc/efuns/parsing/
tmi2_fluffos_v2/lib/doc/driverdoc/lpc/constructs/
tmi2_fluffos_v2/lib/doc/driverdoc/lpc/preprocessor/
tmi2_fluffos_v2/lib/doc/driverdoc/lpc/types/
tmi2_fluffos_v2/lib/doc/driverdoc/platforms/
tmi2_fluffos_v2/lib/doc/mudlib/
tmi2_fluffos_v2/lib/ftp/
tmi2_fluffos_v2/lib/include/driver/
tmi2_fluffos_v2/lib/log/
tmi2_fluffos_v2/lib/log/driver/
tmi2_fluffos_v2/lib/obj/net/
tmi2_fluffos_v2/lib/obj/shells/
tmi2_fluffos_v2/lib/obj/tools/
tmi2_fluffos_v2/lib/std/adt/
tmi2_fluffos_v2/lib/std/board/
tmi2_fluffos_v2/lib/std/body/
tmi2_fluffos_v2/lib/std/fun/
tmi2_fluffos_v2/lib/std/living/
tmi2_fluffos_v2/lib/std/object/
tmi2_fluffos_v2/lib/std/shop/
tmi2_fluffos_v2/lib/std/socket/
tmi2_fluffos_v2/lib/std/user/
tmi2_fluffos_v2/lib/std/virtual/
tmi2_fluffos_v2/lib/student/
tmi2_fluffos_v2/lib/student/kalypso/
tmi2_fluffos_v2/lib/student/kalypso/armor/
tmi2_fluffos_v2/lib/student/kalypso/rooms/
tmi2_fluffos_v2/lib/student/kalypso/weapons/
tmi2_fluffos_v2/lib/u/l/leto/
tmi2_fluffos_v2/lib/u/l/leto/cmds/
tmi2_fluffos_v2/lib/www/errors/
tmi2_fluffos_v2/lib/www/gateways/
tmi2_fluffos_v2/lib/www/images/
tmi2_fluffos_v2/old/
tmi2_fluffos_v2/win32/
                                    DOMAINS
                                    ~~~~~~~
                              (Updated 93.07.22)

Introduction
~~~~~~~~~~~~
The TMI-2 mudlib comes with a series of features which are all tied
together under the heading of domains.  These features allow you to
organize your playing areas and your wizards together into groups,
with a clear hierarchy of permissions and responsibilities, which is
designed to let you organize your MUD more efficiently and more
productively.


What is a Domain?
~~~~~~~~~~~~~~~~~
A domain refers to two objects:  first, a subdirectory of "/d", and
second, the wizards whose code is stored in that directory.  Although
you may handle the organization of your world in any way you like,
most MUDs find it convenient to divide the world into smaller units
and organize the room files so that rooms in the same domain are placed
together in the same subdirectory of "/d".  For example, you might
have three domains in your MUD: `Northlands', `The Barren Desert',
and `The Black Forest'.  Given those, you might want to create three
subdirectories in "/d": call them "/d/northlands", "/d/desert", and
"/d/forest".  The main areas of each domain can be placed in these
directories, with appropriate rooms having exits to each wizard's area
in his home directory.

The default mudlib comes with three domains: `Fooland', which has the
base world, `grid', which is an example of the virtual room facitily, and
`std', which contains the void room.  You can remove `Fooland' and/or `grid',
but do not remove `std' since several parts of the lib rely on "/d/std/void.c"
to exist, to store objects temporarily while rooms are updated or other
disturbing things take place.


Domain Files
~~~~~~~~~~~~
Each domain must contain a subdirectory "adm", i.e. "/d/Fooland/adm".
In this directory, there must be a domain master file ("d_master.c"),
which controls the permissions that people have to write to that
domain.  You should give write access to "/d/<domain name>/adm" to
the head wizard of that domain (hereafter called the domain lord).
Then the domain lord can alter the domain master file to give write
access to other parts of "/d" to those wizards who have areas in that
domain.  This permits you to appoint domain lords without giving them
global access to all files, since they can control permissions within
their domain without accessing "/adm/etc/access" (and the rest of "/adm").
This is desireable because it means domain lords don't have to have admin
permissions, which is useful if you have a lot of wizards, and hence a lot
of domains, but don't want 25 people to have admin access. If you make a
new domain directory, be sure to add it to the #define DOMAIN_DIRS in
domains.h, so that the master object will know to check the domain
master when handling file permissions for the domain directory.

    
Domain Groups
~~~~~~~~~~~~~
The term "domain" also refers to the particular group of wizards who
code the areas in that domain's chunk of the world.  The following
commands are provided:

    o   sponsor -- Assign a wizard to a domain, or promote a wizard
                   within his/her domain.  Wizards may be appointed
                   to more than one domain.

    o   demote  -- Demote a wizard within his/her domain.

    o   people  -- Show the domain of each user and his rank within
                   that domain.

    o   domains -- Select which of the user's domains will appear in
                   the "people" command.

The available ranks (LEVEL_LIST) are defined in "domains.h", where the
default values are "guest", "seeker", "novice", "apprentice", "initiate",
"adept", and "sage".  You're welcome to change these to anything you want.
You should also alter "domains.h" to reflect the different domains within
your lib (DOMAIN_LIST).  Players will show up on the people list as "player"
rank in "None" domain. Unaffiliated wizards will appear as "guest" rank,
also in "None" domain. Other wizards will have their rank and domain
affiliation shown.

Note:
    Domain rank does not control any permissions or powers whatsoever--
    it is used purely to organize wizards into teams.  The only exception
    is that you must be sage rank in a domain to promote someone within a
    domain. (Though admins can promote anyone in any domain.) You may
    want to alter the level at which a wizard can promote within the
    domain: you can alter the #define MIN_SPONSOR_LEVEL in domains.h to
    do that.

    A one-to-one correspondence between domain directories and domain
    groups is not necessary.  You can create domain groups that will
    help organize your wizards not tied to a specific domain.  For
    example, you may edit the DOMAIN_LIST in "domains.h" to include the
    following organizational groups: "mudlib", "driver", "doc",
    "dinosaur", "institute", and "frob".
    You can also have domain directories that don't have a corresponding
    group of wizards. The directory /d/std is an example.

    If a domain has files, but not wizards, it should be on the DOMAIN_DIRS
    #define but not on DOMAIN_LIST. If it has wizards but not files, then
    if needs to be on DOMAIN_LIST, not DOMAIN_DIRS. If it has both,
    then it needs to be on both #defines.


Sample Configuration
~~~~~~~~~~~~~~~~~~~~
Following is a sample configuration for installing a new domain called
`Northlands'.  Use this as a guide only...substitute your own names as
appropriate.  This section assumes you are already familiar LPC and that
you are an admin performing the configuration.

    Relevant Files:
        /include/domains.h
        /d/<domain_name>/adm/d_master.c
        /adm/etc/access
        /adm/etc/groups

    And suppose:
        Desired Ranks:
            player, wizard, elder, god

        Proposed Domain Lord:
            "Alpha"

        Other Wizards in the New Domain:
            "Beta", "Omega"

    [ ]  1. Add "northlands" to the DOMAIN_DIRS array in
            "/include/domains.h".

              #define DOMAIN_DIRS ({ "Fooland", "grid", "std", "northlands" })

            At this point, you can also change the levels (ranks) to
            something more to your liking.  Example:

              #define LEVEL_LIST ({ "player", "wizard", "elder", "god" })

            Note: There are #define's for ENTRY_LEVEL and MIN_SPONSOR_LEVEL.
                These represent the level wizards enter the domain (when
                first sponsored), and the minimum level of a wizard to
                sponsor another wizard to the same domain, respectively.
                A demotion from the ENTRY_LEVEL is removal from the domain.
                The default (and lowest) player level is 0.
                These are integer values that index into the LEVEL_LIST
                array, in the range from 0 to sizeof(LEVEL_LIST) - 1.  In
                this example we'll set them to:

              #define ENTRY_LEVEL 1         // "wizard"
              #define MIN_SPONSOR_LEVEL 3   // "god"

                At least a god (or admin), is needed to sponsor a player
                to the "northlands" domain.  Once sponsored, the player
                becomes a wizard.

    [ ]  2. Create the "northlands" domain subdirectory.

            mkdir /d/northlands
            mkdir /d/northlands/adm

    [ ]  3. Edit "/adm/etc/groups".  The first part is the `Northlands'
            domain group, while the second part is the domain name.

            (northlands)    Northlands

    [ ]  4. Edit "/adm/etc/access".  The first part is the `Northlands'
            domain directory path.  The second part consists of domain
            groups (in parentheses), followed by the permissions [in
            brackets--r = read access, w = write access].  Group/permission
            pairs are separated by a colon.

            (/d/northlands) (all)[r]:(northlands)[rw]:(admin)[rw]

    [ ]  5. Create the domain master file, "d_master.c" in the domain
            subdirectory.

            // File: /d/northlands/adm/d_master.c

            inherit "/adm/obj/master/d_master";

            create() {
                ::create();

                // create the group list
                //   lower case id of wizard followed by domain class
                group_list = ([
                    // Basic
                    getuid() : "objects",

                    // Domain Lord
                    "alpha" : "admin",

                    // Other Domain Wizards
                    "beta" : "northlands",
                    "omega" : "northlands"
                ]);

                // set the permissions
                //   domain class followed by a mapping specifying the
                //   permissions on subdirectories in the domain
                //   directory
                permission_list = ([
                    // Basic
                    "objects"     : ([ "/" : "r-", "data" :"rw"]),
                    "non-members" : ([ "/" : "r-" ]),

                    // "admin" domain class for the Domain Lord
                    "admin" : ([ "/" : "rw", "data" : "rw", "adm" : "rw"]),

                    // domain class for other wizards in the domain
                    "northlands" : ([ "/" : "rw" ])
                ]);
            }

         =======
            A note about permission_list:  The subdirectories are relative
            to the domain directory path.  "/" is the root domain directory,
            or "/d/northlands" in this case.  Similarly, "data" represents
            "/d/northlands/data" and "adm" corresponds to "/d/northlands/adm".

            The read/write permissions are not declared in the same manner
            as in "/adm/etc/access".  Here the only valid two character
            strings are: "--" (no access whatsoever), "r-" (read only),
            "-w" (write only), and "rw" (read and write access).
         =======

    [ ]  6. Shutdown and restart the mud, _OR_ update/reload the
            appropriate objects.

            update -R /adm/obj/master
            update /cmds/xtra/_sponsor
	    update /d/northlands/adm/d_master

    [ ]  7. Sponsor the intended domain lord (preferably to the highest
            domain rank).

            sponsor alpha Northlands    ; starts off as wizard in the domain
            sponsor alpha Northlands    ; promotion to elder
            sponsor alpha Northlands    ; promotion to god

    [ ]  8. At this point, the domain lord ("Alpha"), or yourself, can
            sponsor "Beta" and "Omega" to the `Northlands' domain.

            This concludes the tutorial.