mux/src/flags.cpp File Reference

#include "copyright.h"
#include "autoconf.h"
#include "config.h"
#include "externs.h"
#include "command.h"
#include "powers.h"

Include dependency graph for flags.cpp:

Go to the source code of this file.

Functions

static bool fh_any (dbref target, dbref player, FLAG flag, int fflags, bool reset)
static bool fh_god (dbref target, dbref player, FLAG flag, int fflags, bool reset)
static bool fh_wiz (dbref target, dbref player, FLAG flag, int fflags, bool reset)
static bool fh_wizroy (dbref target, dbref player, FLAG flag, int fflags, bool reset)
static bool fh_restrict_player (dbref target, dbref player, FLAG flag, int fflags, bool reset)
static bool fh_privileged (dbref target, dbref player, FLAG flag, int fflags, bool reset)
static bool fh_inherit (dbref target, dbref player, FLAG flag, int fflags, bool reset)
static bool fh_dark_bit (dbref target, dbref player, FLAG flag, int fflags, bool reset)
static bool fh_going_bit (dbref target, dbref player, FLAG flag, int fflags, bool reset)
static bool fh_hear_bit (dbref target, dbref player, FLAG flag, int fflags, bool reset)
static bool fh_player_bit (dbref target, dbref player, FLAG flag, int fflags, bool reset)
static bool fh_staff (dbref target, dbref player, FLAG flag, int fflags, bool reset)
void init_flagtab (void)
void display_flagtab (dbref player)
char * MakeCanonicalFlagName (const char *pName, int *pnName, bool *pbValid)
static FLAGNAMEENTfind_flag (char *flagname)
void flag_set (dbref target, dbref player, char *flag, int key)
char * decode_flags (dbref player, FLAGSET *fs)
bool has_flag (dbref player, dbref it, char *flagname)
char * flag_description (dbref player, dbref target)
char * unparse_object_numonly (dbref target)
char * unparse_object (dbref player, dbref target, bool obey_myopic)
 CF_HAND (cf_flag_access)
bool convert_flags (dbref player, char *flaglist, FLAGSET *fset, FLAG *p_type)
void decompile_flags (dbref player, dbref thing, char *thingname)
static bool flag_rename (char *alias, char *newname)
void do_flag (dbref executor, dbref caller, dbref enactor, int key, int nargs, char *flag1, char *flag2)
 CF_HAND (cf_flag_name)

Variables

static FLAGBITENT fbeAbode = { ABODE, 'A', FLAG_WORD2, 0, fh_any}
static FLAGBITENT fbeAnsi = { ANSI, 'X', FLAG_WORD2, 0, fh_any}
static FLAGBITENT fbeAudible = { HEARTHRU, 'a', FLAG_WORD1, 0, fh_hear_bit}
static FLAGBITENT fbeAuditorium = { AUDITORIUM, 'b', FLAG_WORD2, 0, fh_any}
static FLAGBITENT fbeBlind = { BLIND, 'B', FLAG_WORD2, 0, fh_wiz}
static FLAGBITENT fbeChownOk = { CHOWN_OK, 'C', FLAG_WORD1, 0, fh_any}
static FLAGBITENT fbeConnected = { CONNECTED, 'c', FLAG_WORD2, CA_NO_DECOMP, fh_god}
static FLAGBITENT fbeDark = { DARK, 'D', FLAG_WORD1, 0, fh_dark_bit}
static FLAGBITENT fbeDestroyOk = { DESTROY_OK, 'd', FLAG_WORD1, 0, fh_any}
static FLAGBITENT fbeEnterOk = { ENTER_OK, 'e', FLAG_WORD1, 0, fh_any}
static FLAGBITENT fbeFixed = { FIXED, 'f', FLAG_WORD2, 0, fh_restrict_player}
static FLAGBITENT fbeFloating = { FLOATING, 'F', FLAG_WORD2, 0, fh_any}
static FLAGBITENT fbeGagged = { GAGGED, 'j', FLAG_WORD2, 0, fh_wiz}
static FLAGBITENT fbeGoing = { GOING, 'G', FLAG_WORD1, CA_NO_DECOMP, fh_going_bit}
static FLAGBITENT fbeHalted = { HALT, 'h', FLAG_WORD1, 0, fh_any}
static FLAGBITENT fbeHasDaily = { HAS_DAILY, '*', FLAG_WORD2, CA_GOD|CA_NO_DECOMP, fh_god}
static FLAGBITENT fbeHasForwardList = { HAS_FWDLIST, '&', FLAG_WORD2, CA_GOD|CA_NO_DECOMP, fh_god}
static FLAGBITENT fbeHasListen = { HAS_LISTEN, '@', FLAG_WORD2, CA_GOD|CA_NO_DECOMP, fh_god}
static FLAGBITENT fbeHasStartup = { HAS_STARTUP, '+', FLAG_WORD1, CA_GOD|CA_NO_DECOMP, fh_god}
static FLAGBITENT fbeHaven = { HAVEN, 'H', FLAG_WORD1, 0, fh_any}
static FLAGBITENT fbeHead = { HEAD_FLAG, '?', FLAG_WORD2, 0, fh_wiz}
static FLAGBITENT fbeHtml = { HTML, '(', FLAG_WORD2, 0, fh_any}
static FLAGBITENT fbeImmortal = { IMMORTAL, 'i', FLAG_WORD1, 0, fh_wiz}
static FLAGBITENT fbeInherit = { INHERIT, 'I', FLAG_WORD1, 0, fh_inherit}
static FLAGBITENT fbeJumpOk = { JUMP_OK, 'J', FLAG_WORD1, 0, fh_any}
static FLAGBITENT fbeKeepAlive = { CKEEPALIVE, 'k', FLAG_WORD2, 0, fh_any}
static FLAGBITENT fbeKey = { KEY, 'K', FLAG_WORD2, 0, fh_any}
static FLAGBITENT fbeLight = { LIGHT, 'l', FLAG_WORD2, 0, fh_any}
static FLAGBITENT fbeLinkOk = { LINK_OK, 'L', FLAG_WORD1, 0, fh_any}
static FLAGBITENT fbeMonitor = { MONITOR, 'M', FLAG_WORD1, 0, fh_hear_bit}
static FLAGBITENT fbeMyopic = { MYOPIC, 'm', FLAG_WORD1, 0, fh_any}
static FLAGBITENT fbeNoCommand = { NO_COMMAND, 'n', FLAG_WORD2, 0, fh_any}
static FLAGBITENT fbeNoAccents = { NOACCENTS, '~', FLAG_WORD2, 0, fh_any}
static FLAGBITENT fbeNoBleed = { NOBLEED, '-', FLAG_WORD2, 0, fh_any}
static FLAGBITENT fbeNoSpoof = { NOSPOOF, 'N', FLAG_WORD1, 0, fh_any}
static FLAGBITENT fbeOpaque = { TM_OPAQUE, 'O', FLAG_WORD1, 0, fh_any}
static FLAGBITENT fbeOpenOk = { OPEN_OK, 'z', FLAG_WORD2, 0, fh_wiz}
static FLAGBITENT fbeParentOk = { PARENT_OK, 'Y', FLAG_WORD2, 0, fh_any}
static FLAGBITENT fbePlayerMails = { PLAYER_MAILS, ' ', FLAG_WORD2, CA_GOD|CA_NO_DECOMP, fh_god}
static FLAGBITENT fbePuppet = { PUPPET, 'p', FLAG_WORD1, 0, fh_hear_bit}
static FLAGBITENT fbeQuiet = { QUIET, 'Q', FLAG_WORD1, 0, fh_any}
static FLAGBITENT fbeRobot = { ROBOT, 'r', FLAG_WORD1, 0, fh_player_bit}
static FLAGBITENT fbeRoyalty = { ROYALTY, 'Z', FLAG_WORD1, 0, fh_wiz}
static FLAGBITENT fbeSafe = { SAFE, 's', FLAG_WORD1, 0, fh_any}
static FLAGBITENT fbeSlave = { SLAVE, 'x', FLAG_WORD2, CA_WIZARD, fh_wiz}
static FLAGBITENT fbeStaff = { STAFF, 'w', FLAG_WORD2, 0, fh_wiz}
static FLAGBITENT fbeSticky = { STICKY, 'S', FLAG_WORD1, 0, fh_any}
static FLAGBITENT fbeSuspect = { SUSPECT, 'u', FLAG_WORD2, CA_WIZARD, fh_wiz}
static FLAGBITENT fbeTerse = { TERSE, 'q', FLAG_WORD1, 0, fh_any}
static FLAGBITENT fbeTrace = { TRACE, 'T', FLAG_WORD1, 0, fh_any}
static FLAGBITENT fbeTransparent = { SEETHRU, 't', FLAG_WORD1, 0, fh_any}
static FLAGBITENT fbeUnfindable = { UNFINDABLE, 'U', FLAG_WORD2, 0, fh_any}
static FLAGBITENT fbeUninspected = { UNINSPECTED, 'g', FLAG_WORD2, 0, fh_wizroy}
static FLAGBITENT fbeVacation = { VACATION, '|', FLAG_WORD2, 0, fh_restrict_player}
static FLAGBITENT fbeVerbose = { VERBOSE, 'v', FLAG_WORD1, 0, fh_any}
static FLAGBITENT fbeVisual = { VISUAL, 'V', FLAG_WORD1, 0, fh_any}
static FLAGBITENT fbeWizard = { WIZARD, 'W', FLAG_WORD1, 0, fh_god}
static FLAGBITENT fbeSitemon = { SITEMON, '$', FLAG_WORD3, 0, fh_wiz}
static FLAGBITENT fbeMarker0 = { MARK_0, '0', FLAG_WORD3, 0, fh_god}
static FLAGBITENT fbeMarker1 = { MARK_1, '1', FLAG_WORD3, 0, fh_god}
static FLAGBITENT fbeMarker2 = { MARK_2, '2', FLAG_WORD3, 0, fh_god}
static FLAGBITENT fbeMarker3 = { MARK_3, '3', FLAG_WORD3, 0, fh_god}
static FLAGBITENT fbeMarker4 = { MARK_4, '4', FLAG_WORD3, 0, fh_god}
static FLAGBITENT fbeMarker5 = { MARK_5, '5', FLAG_WORD3, 0, fh_god}
static FLAGBITENT fbeMarker6 = { MARK_6, '6', FLAG_WORD3, 0, fh_god}
static FLAGBITENT fbeMarker7 = { MARK_7, '7', FLAG_WORD3, 0, fh_god}
static FLAGBITENT fbeMarker8 = { MARK_8, '8', FLAG_WORD3, 0, fh_god}
static FLAGBITENT fbeMarker9 = { MARK_9, '9', FLAG_WORD3, 0, fh_god}
FLAGNAMEENT gen_flag_names []
OBJENT object_types [8]


Function Documentation

CF_HAND ( cf_flag_name   ) 

Definition at line 1259 of file flags.cpp.

References flag_rename(), mux_strtok_ctl(), mux_strtok_parse(), mux_strtok_src(), and UNUSED_PARAMETER.

01260 {
01261     UNUSED_PARAMETER(vp);
01262     UNUSED_PARAMETER(pExtra);
01263     UNUSED_PARAMETER(nExtra);
01264     UNUSED_PARAMETER(player);
01265     UNUSED_PARAMETER(cmd);
01266 
01267     MUX_STRTOK_STATE tts;
01268     mux_strtok_src(&tts, str);
01269     mux_strtok_ctl(&tts, " \t=,");
01270     char *flagstr = mux_strtok_parse(&tts);
01271     char *namestr = mux_strtok_parse(&tts);
01272 
01273     if (  !flagstr
01274        || !*flagstr
01275        || !namestr
01276        || !*namestr)
01277     {
01278         return -1;
01279     }
01280 
01281     if (flag_rename(flagstr, namestr))
01282     {
01283         return 0;
01284     }
01285     else
01286     {
01287         return -1;
01288     }
01289 }

CF_HAND ( cf_flag_access   ) 

Definition at line 943 of file flags.cpp.

References cf_log_notfound(), ENDLOG, flag_name_entry::fbe, fh_any(), fh_god(), fh_privileged(), fh_restrict_player(), fh_staff(), fh_wiz(), fh_wizroy(), find_flag(), flag_name_entry::flagname, flag_bit_entry::handler, LOG_CONFIGMODS, log_text(), mux_strtok_ctl(), mux_strtok_parse(), mux_strtok_src(), STARTLOG, and UNUSED_PARAMETER.

00944 {
00945     UNUSED_PARAMETER(vp);
00946     UNUSED_PARAMETER(pExtra);
00947     UNUSED_PARAMETER(nExtra);
00948 
00949     MUX_STRTOK_STATE tts;
00950     mux_strtok_src(&tts, str);
00951     mux_strtok_ctl(&tts, " \t=,");
00952     char *fstr = mux_strtok_parse(&tts);
00953     char *permstr = mux_strtok_parse(&tts);
00954 
00955     if (!fstr || !*fstr)
00956     {
00957         return -1;
00958     }
00959 
00960     FLAGNAMEENT *fp;
00961     if ((fp = find_flag(fstr)) == NULL)
00962     {
00963         cf_log_notfound(player, cmd, "No such flag", fstr);
00964         return -1;
00965     }
00966     FLAGBITENT *fbe = fp->fbe;
00967 
00968     // Don't change the handlers on special things.
00969     //
00970     if (  (fbe->handler != fh_any)
00971        && (fbe->handler != fh_wizroy)
00972        && (fbe->handler != fh_wiz)
00973        && (fbe->handler != fh_god)
00974        && (fbe->handler != fh_restrict_player)
00975        && (fbe->handler != fh_privileged))
00976     {
00977         STARTLOG(LOG_CONFIGMODS, "CFG", "PERM");
00978         log_text("Cannot change access for flag: ");
00979         log_text(fp->flagname);
00980         ENDLOG;
00981         return -1;
00982     }
00983 
00984     if (!strcmp(permstr, "any"))
00985     {
00986         fbe->handler = fh_any;
00987     }
00988     else if (!strcmp(permstr, "royalty"))
00989     {
00990         fbe->handler = fh_wizroy;
00991     }
00992     else if (!strcmp(permstr, "wizard"))
00993     {
00994         fbe->handler = fh_wiz;
00995     }
00996     else if (!strcmp(permstr, "god"))
00997     {
00998         fbe->handler = fh_god;
00999     }
01000     else if (!strcmp(permstr, "restrict_player"))
01001     {
01002         fbe->handler = fh_restrict_player;
01003     }
01004     else if (!strcmp(permstr, "privileged"))
01005     {
01006         fbe->handler = fh_privileged;
01007     }
01008     else if (!strcmp(permstr, "staff"))
01009     {
01010         fbe->handler = fh_staff;
01011     }
01012     else
01013     {
01014         cf_log_notfound(player, cmd, "Flag access", permstr);
01015         return -1;
01016     }
01017     return 0;
01018 }

bool convert_flags ( dbref  player,
char *  flaglist,
FLAGSET fset,
FLAG p_type 
)

Definition at line 1026 of file flags.cpp.

References flag_name_entry::bPositive, CA_ADMIN, CA_GOD, CA_STAFF, CA_WIZARD, flag_name_entry::fbe, FLAG_WORD1, FLAG_WORD2, FLAG_WORD3, flag_name_entry::flagname, gen_flag_names, God, notify, NOTYPE, object_types, Staff, tprintf(), Wizard, WizRoy, and flagset::word.

Referenced by handle_flaglists(), and search_setup().

01027 {
01028     FLAG type = NOTYPE;
01029     FLAGSET flagmask;
01030     flagmask.word[FLAG_WORD1] = 0;
01031     flagmask.word[FLAG_WORD2] = 0;
01032     flagmask.word[FLAG_WORD3] = 0;
01033     int i;
01034 
01035     char *s;
01036     bool handled;
01037     for (s = flaglist; *s; s++)
01038     {
01039         handled = false;
01040 
01041         // Check for object type.
01042         //
01043         for (i = 0; i <= 7 && !handled; i++)
01044         {
01045             if (  object_types[i].lett == *s
01046                && !(  (  (object_types[i].perm & CA_STAFF)
01047                       && !Staff(player))
01048                    || (  (object_types[i].perm & CA_ADMIN)
01049                       && !WizRoy(player))
01050                    || (  (object_types[i].perm & CA_WIZARD)
01051                       && !Wizard(player))
01052                    || (  (object_types[i].perm & CA_GOD)
01053                       && !God(player))))
01054             {
01055                 if (  type != NOTYPE
01056                    && type != i)
01057                 {
01058                     char *p = tprintf("%c: Conflicting type specifications.",
01059                         *s);
01060                     notify(player, p);
01061                     return false;
01062                 }
01063                 type = i;
01064                 handled = true;
01065             }
01066         }
01067 
01068         // Check generic flags.
01069         //
01070         if (handled)
01071         {
01072             continue;
01073         }
01074         FLAGNAMEENT *fp;
01075         for (fp = gen_flag_names; fp->flagname && !handled; fp++)
01076         {
01077             FLAGBITENT *fbe = fp->fbe;
01078             if (  !fp->bPositive
01079                || fbe->flaglett == ' ')
01080             {
01081                 continue;
01082             }
01083             if (  fbe->flaglett == *s
01084                && !(  (  (fbe->listperm & CA_STAFF)
01085                       && !Staff(player))
01086                    || (  (fbe->listperm & CA_ADMIN)
01087                       && !WizRoy(player))
01088                    || (  (fbe->listperm & CA_WIZARD)
01089                       && !Wizard(player))
01090                    || (  (fbe->listperm & CA_GOD)
01091                       && !God(player))))
01092             {
01093                 flagmask.word[fbe->flagflag] |= fbe->flagvalue;
01094                 handled = true;
01095             }
01096         }
01097 
01098         if (!handled)
01099         {
01100             notify(player,
01101                    tprintf("%c: Flag unknown or not valid for specified object type",
01102                        *s));
01103             return false;
01104         }
01105     }
01106 
01107     // Return flags to search for and type.
01108     //
01109     *fset = flagmask;
01110     *p_type = type;
01111     return true;
01112 }

char* decode_flags ( dbref  player,
FLAGSET fs 
)

Definition at line 661 of file flags.cpp.

References alloc_sbuf, flag_name_entry::bPositive, CA_ADMIN, CA_GOD, CA_STAFF, CA_WIZARD, CONNECTED, DARK, flag_name_entry::fbe, FLAG_WORD1, FLAG_WORD2, flag_name_entry::flagname, gen_flag_names, God, Good_obj, mux_isdigit, object_types, safe_sb_chr, See_Hidden, Staff, TYPE_MASK, TYPE_PLAYER, Wizard, WIZARD, WizRoy, and flagset::word.

Referenced by FUNCTION(), list_df_flags(), shutdownsock(), and unparse_object().

00662 {
00663     char *buf, *bp;
00664     buf = bp = alloc_sbuf("decode_flags");
00665     *bp = '\0';
00666 
00667     if (!Good_obj(player))
00668     {
00669         strcpy(buf, "#-2 ERROR");
00670         return buf;
00671     }
00672     int flagtype = fs->word[FLAG_WORD1] & TYPE_MASK;
00673     bool bNeedColon = true;
00674     if (object_types[flagtype].lett != ' ')
00675     {
00676         safe_sb_chr(object_types[flagtype].lett, buf, &bp);
00677         bNeedColon = false;
00678     }
00679 
00680     FLAGNAMEENT *fp;
00681     for (fp = gen_flag_names; fp->flagname; fp++)
00682     {
00683         FLAGBITENT *fbe = fp->fbe;
00684         if (  !fp->bPositive
00685            || fbe->flaglett == ' ')
00686         {
00687             // Only look at positive-sense entries that have non-space flag
00688             // letters.
00689             //
00690             continue;
00691         }
00692         if (fs->word[fbe->flagflag] & fbe->flagvalue)
00693         {
00694             if (  (  (fbe->listperm & CA_STAFF)
00695                   && !Staff(player))
00696                || (  (fbe->listperm & CA_ADMIN)
00697                   && !WizRoy(player))
00698                || (  (fbe->listperm & CA_WIZARD)
00699                   && !Wizard(player))
00700                || (  (fbe->listperm & CA_GOD)
00701                   && !God(player)))
00702             {
00703                 continue;
00704             }
00705 
00706             // Don't show CONNECT on dark wizards to mortals
00707             //
00708             if (  flagtype == TYPE_PLAYER
00709                && fbe->flagflag == FLAG_WORD2
00710                && fbe->flagvalue == CONNECTED
00711                && (fs->word[FLAG_WORD1] & (WIZARD | DARK)) == (WIZARD | DARK)
00712                && !See_Hidden(player))
00713             {
00714                 continue;
00715             }
00716 
00717             if (  bNeedColon
00718                && mux_isdigit(fbe->flaglett))
00719             {
00720                 // We can't allow numerical digits at the beginning.
00721                 //
00722                 safe_sb_chr(':', buf, &bp);
00723             }
00724             safe_sb_chr(fbe->flaglett, buf, &bp);
00725             bNeedColon = false;
00726         }
00727     }
00728     *bp = '\0';
00729     return buf;
00730 }

void decompile_flags ( dbref  player,
dbref  thing,
char *  thingname 
)

Definition at line 1119 of file flags.cpp.

References flag_name_entry::bPositive, CA_NO_DECOMP, check_access(), db, flag_name_entry::fbe, flag_name_entry::flagname, object::fs, gen_flag_names, notify, strip_ansi(), tprintf(), and flagset::word.

01120 {
01121     // Report generic flags.
01122     //
01123     FLAGNAMEENT *fp;
01124     for (fp = gen_flag_names; fp->flagname; fp++)
01125     {
01126         FLAGBITENT *fbe = fp->fbe;
01127 
01128         // Only handle positive-sense entries.
01129         // Skip if we shouldn't decompile this flag.
01130         // Skip if this flag isn't set.
01131         // Skip if we can't see this flag.
01132         //
01133         if (  !fp->bPositive
01134            || (fbe->listperm & CA_NO_DECOMP)
01135            || (db[thing].fs.word[fbe->flagflag] & fbe->flagvalue) == 0
01136            || !check_access(player, fbe->listperm))
01137         {
01138             continue;
01139         }
01140 
01141         // Report this flag.
01142         //
01143         notify(player, tprintf("@set %s=%s", strip_ansi(thingname),
01144             fp->flagname));
01145     }
01146 }

void display_flagtab ( dbref  player  ) 

Definition at line 483 of file flags.cpp.

References alloc_lbuf, flag_name_entry::bPositive, CA_GOD, CA_WIZARD, flag_name_entry::fbe, flag_name_entry::flagname, free_lbuf, gen_flag_names, God, notify, safe_chr, safe_str, and Wizard.

Referenced by do_list().

00484 {
00485     char *buf, *bp;
00486     FLAGNAMEENT *fp;
00487 
00488     bp = buf = alloc_lbuf("display_flagtab");
00489     safe_str("Flags:", buf, &bp);
00490     for (fp = gen_flag_names; fp->flagname; fp++)
00491     {
00492         FLAGBITENT *fbe = fp->fbe;
00493         if (  (  (fbe->listperm & CA_WIZARD)
00494               && !Wizard(player))
00495            || (  (fbe->listperm & CA_GOD)
00496               && !God(player)))
00497         {
00498             continue;
00499         }
00500         safe_chr(' ', buf, &bp);
00501         safe_str(fp->flagname, buf, &bp);
00502         if (fbe->flaglett != ' ')
00503         {
00504             safe_chr('(', buf, &bp);
00505             if (!fp->bPositive)
00506             {
00507                 safe_chr('!', buf, &bp);
00508             }
00509             safe_chr(fbe->flaglett, buf, &bp);
00510             safe_chr(')', buf, &bp);
00511         }
00512     }
00513     *bp = '\0';
00514     notify(player, buf);
00515     free_lbuf(buf);
00516 }

void do_flag ( dbref  executor,
dbref  caller,
dbref  enactor,
int  key,
int  nargs,
char *  flag1,
char *  flag2 
)

Definition at line 1201 of file flags.cpp.

References FLAG_REMOVE, flag_rename(), flag_name_entry::flagname, statedata::flags_htab, hashdeleteLEN(), hashfindLEN(), MakeCanonicalFlagName(), MEMFREE, mudstate, mux_stricmp(), notify, flag_name_entry::pOrigName, tprintf(), and UNUSED_PARAMETER.

01203 {
01204     UNUSED_PARAMETER(caller);
01205     UNUSED_PARAMETER(enactor);
01206 
01207     if (key & FLAG_REMOVE)
01208     {
01209         if (nargs == 2)
01210         {
01211             notify(executor, "Extra argument ignored.");
01212         }
01213         int nAlias;
01214         bool bValidAlias;
01215         char *pCheckedAlias = MakeCanonicalFlagName(flag1, &nAlias, &bValidAlias);
01216         if (bValidAlias)
01217         {
01218             FLAGNAMEENT *lookup;
01219             lookup = (FLAGNAMEENT *)hashfindLEN(pCheckedAlias, nAlias, &mudstate.flags_htab);
01220             if (lookup)
01221             {
01222                 if (  lookup->flagname != lookup->pOrigName
01223                    && mux_stricmp(lookup->flagname, pCheckedAlias) == 0)
01224                 {
01225                     MEMFREE(lookup->flagname);
01226                     lookup->flagname = lookup->pOrigName;
01227                     hashdeleteLEN(pCheckedAlias, nAlias, &mudstate.flags_htab);
01228                     notify(executor, tprintf("Flag name '%s' removed from the hash table.", pCheckedAlias));
01229                 }
01230                 else
01231                 {
01232                     notify(executor, "Error: You can't remove the present flag name from the hash table.");
01233                 }
01234             }
01235         }
01236     }
01237     else
01238     {
01239         if (nargs < 2)
01240         {
01241             notify(executor, "You must specify a flag and a name.");
01242             return;
01243         }
01244         if (flag_rename(flag1, flag2))
01245         {
01246             notify(executor, "Flag name changed.");
01247         }
01248         else
01249         {
01250             notify(executor, "Error: Bad flagname given or flag not found.");
01251         }
01252     }
01253 }

static bool fh_any ( dbref  target,
dbref  player,
FLAG  flag,
int  fflags,
bool  reset 
) [static]

Definition at line 18 of file flags.cpp.

References db, FLAG_WORD1, object::fs, God, notify, WIZARD, and flagset::word.

Referenced by CF_HAND(), fh_dark_bit(), fh_god(), fh_going_bit(), fh_hear_bit(), fh_inherit(), fh_player_bit(), fh_privileged(), fh_restrict_player(), fh_staff(), fh_wiz(), and fh_wizroy().

00019 {
00020     // Never let God drop his/her own wizbit.
00021     //
00022     if (  God(target)
00023        && reset
00024        && flag == WIZARD
00025        && fflags == FLAG_WORD1)
00026     {
00027         notify(player, "You cannot make God mortal.");
00028         return false;
00029     }
00030 
00031     // Otherwise we can go do it.
00032     //
00033     if (reset)
00034     {
00035         db[target].fs.word[fflags] &= ~flag;
00036     }
00037     else
00038     {
00039         db[target].fs.word[fflags] |= flag;
00040     }
00041     return true;
00042 }

static bool fh_dark_bit ( dbref  target,
dbref  player,
FLAG  flag,
int  fflags,
bool  reset 
) [static]

Definition at line 154 of file flags.cpp.

References Can_Hide, fh_any(), isPlayer, and Wizard.

00155 {
00156     if (  !reset
00157        && isPlayer(target)
00158        && !(  (target == player)
00159            && Can_Hide(player))
00160        && !Wizard(player))
00161     {
00162         return false;
00163     }
00164     return (fh_any(target, player, flag, fflags, reset));
00165 }

static bool fh_god ( dbref  target,
dbref  player,
FLAG  flag,
int  fflags,
bool  reset 
) [static]

Definition at line 48 of file flags.cpp.

References fh_any(), and God.

Referenced by CF_HAND().

00049 {
00050     if (!God(player))
00051     {
00052         return false;
00053     }
00054     return (fh_any(target, player, flag, fflags, reset));
00055 }

static bool fh_going_bit ( dbref  target,
dbref  player,
FLAG  flag,
int  fflags,
bool  reset 
) [static]

Definition at line 172 of file flags.cpp.

References confdata::default_home, fh_any(), God, Going, confdata::master_room, mudconf, notify, confdata::start_home, confdata::start_room, TYPE_GARBAGE, and Typeof.

00173 {
00174     if (  Going(target)
00175        && reset
00176        && (Typeof(target) != TYPE_GARBAGE))
00177     {
00178         notify(player, "Your object has been spared from destruction.");
00179         return (fh_any(target, player, flag, fflags, reset));
00180     }
00181     if (!God(player))
00182     {
00183         return false;
00184     }
00185 
00186     // Even God should not be allowed set protected dbrefs GOING.
00187     //
00188     if (  !reset
00189        && (  target == 0
00190           || God(target)
00191           || target == mudconf.start_home
00192           || target == mudconf.start_room
00193           || target == mudconf.default_home
00194           || target == mudconf.master_room))
00195     {
00196         return false;
00197     }
00198     return (fh_any(target, player, flag, fflags, reset));
00199 }

static bool fh_hear_bit ( dbref  target,
dbref  player,
FLAG  flag,
int  fflags,
bool  reset 
) [static]

Definition at line 206 of file flags.cpp.

References Can_Monitor, fh_any(), handle_ears(), Hearer(), isPlayer, and MONITOR.

00207 {
00208     if (isPlayer(target) && (flag & MONITOR))
00209     {
00210         if (Can_Monitor(player))
00211         {
00212             return (fh_any(target, player, flag, fflags, reset));
00213         }
00214         else
00215         {
00216             return false;
00217         }
00218     }
00219 
00220     bool could_hear = Hearer(target);
00221     bool result = fh_any(target, player, flag, fflags, reset);
00222     handle_ears(target, could_hear, Hearer(target));
00223     return result;
00224 }

static bool fh_inherit ( dbref  target,
dbref  player,
FLAG  flag,
int  fflags,
bool  reset 
) [static]

Definition at line 140 of file flags.cpp.

References fh_any(), and Inherits.

00141 {
00142     if (!Inherits(player))
00143     {
00144         return false;
00145     }
00146     return (fh_any(target, player, flag, fflags, reset));
00147 }

static bool fh_player_bit ( dbref  target,
dbref  player,
FLAG  flag,
int  fflags,
bool  reset 
) [static]

Definition at line 231 of file flags.cpp.

References fh_any(), and isPlayer.

00238 {
00239     if (isPlayer(target))
00240     {
00241         return false;
00242     }
00243     return (fh_any(target, player, flag, fflags, reset));
00244 }

static bool fh_privileged ( dbref  target,
dbref  player,
FLAG  flag,
int  fflags,
bool  reset 
) [static]

Definition at line 114 of file flags.cpp.

References db, fh_any(), God, isPlayer, and Owner.

Referenced by CF_HAND().

00121 {
00122     if (!God(player))
00123     {
00124         if (  !isPlayer(player)
00125            || player != Owner(player)
00126            || isPlayer(target)
00127            || (db[player].fs.word[fflags] & flag) == 0)
00128         {
00129             return false;
00130         }
00131     }
00132     return (fh_any(target, player, flag, fflags, reset));
00133 }

static bool fh_restrict_player ( dbref  target,
dbref  player,
FLAG  flag,
int  fflags,
bool  reset 
) [static]

Definition at line 92 of file flags.cpp.

References fh_any(), isPlayer, and Wizard.

Referenced by CF_HAND().

00099 {
00100     if (  isPlayer(target)
00101        && !Wizard(player))
00102     {
00103         return false;
00104     }
00105     return (fh_any(target, player, flag, fflags, reset));
00106 }

static bool fh_staff ( dbref  target,
dbref  player,
FLAG  flag,
int  fflags,
bool  reset 
) [static]

Definition at line 251 of file flags.cpp.

References fh_any(), God, and Staff.

Referenced by CF_HAND().

00258 {
00259     if (!Staff(player) && !God(player))
00260     {
00261         return false;
00262     }
00263     return (fh_any(target, player, flag, fflags, reset));
00264 }

static bool fh_wiz ( dbref  target,
dbref  player,
FLAG  flag,
int  fflags,
bool  reset 
) [static]

Definition at line 62 of file flags.cpp.

References fh_any(), and Wizard.

Referenced by CF_HAND().

00063 {
00064     if (!Wizard(player))
00065     {
00066         return false;
00067     }
00068     return (fh_any(target, player, flag, fflags, reset));
00069 }

static bool fh_wizroy ( dbref  target,
dbref  player,
FLAG  flag,
int  fflags,
bool  reset 
) [static]

Definition at line 76 of file flags.cpp.

References fh_any(), and WizRoy.

Referenced by CF_HAND().

00077 {
00078     if (!WizRoy(player))
00079     {
00080         return false;
00081     }
00082     return (fh_any(target, player, flag, fflags, reset));
00083 }

static FLAGNAMEENT* find_flag ( char *  flagname  )  [static]

Definition at line 551 of file flags.cpp.

References statedata::flags_htab, hashfindLEN(), MakeCanonicalFlagName(), and mudstate.

Referenced by CF_HAND(), flag_set(), and has_flag().

00552 {
00553     // Convert flagname to canonical lowercase format.
00554     //
00555     int nName;
00556     bool bValid;
00557     char *pName = MakeCanonicalFlagName(flagname, &nName, &bValid);
00558     FLAGNAMEENT *fe = NULL;
00559     if (bValid)
00560     {
00561         fe = (FLAGNAMEENT *)hashfindLEN(pName, nName, &mudstate.flags_htab);
00562     }
00563     return fe;
00564 }

char* flag_description ( dbref  player,
dbref  target 
)

Definition at line 783 of file flags.cpp.

References alloc_mbuf, flag_name_entry::bPositive, CA_ADMIN, CA_GOD, CA_PUBLIC, CA_STAFF, CA_WIZARD, CONNECTED, db, flag_name_entry::fbe, FLAG_WORD2, flag_bit_entry::flagflag, flag_name_entry::flagname, flag_bit_entry::flagvalue, gen_flag_names, God, Hidden, isPlayer, flag_bit_entry::listperm, object_types, safe_mb_chr, safe_mb_str, See_Hidden, Staff, Typeof, Wizard, and WizRoy.

Referenced by debug_examine(), and do_examine().

00784 {
00785     // Allocate the return buffer.
00786     //
00787     int otype = Typeof(target);
00788     char *buff = alloc_mbuf("flag_description");
00789     char *bp = buff;
00790 
00791     // Store the header strings and object type.
00792     //
00793     safe_mb_str("Type: ", buff, &bp);
00794     safe_mb_str(object_types[otype].name, buff, &bp);
00795     safe_mb_str(" Flags:", buff, &bp);
00796     if (object_types[otype].perm != CA_PUBLIC)
00797     {
00798         *bp = '\0';
00799         return buff;
00800     }
00801 
00802     // Store the type-invariant flags.
00803     //
00804     FLAGNAMEENT *fp;
00805     for (fp = gen_flag_names; fp->flagname; fp++)
00806     {
00807         if (!fp->bPositive)
00808         {
00809             continue;
00810         }
00811         FLAGBITENT *fbe = fp->fbe;
00812         if (db[target].fs.word[fbe->flagflag] & fbe->flagvalue)
00813         {
00814             if (  (  (fbe->listperm & CA_STAFF)
00815                   && !Staff(player))
00816                || (  (fbe->listperm & CA_ADMIN)
00817                   && !WizRoy(player))
00818                || (  (fbe->listperm & CA_WIZARD)
00819                   && !Wizard(player))
00820                || (  (fbe->listperm & CA_GOD)
00821                   && !God(player)))
00822             {
00823                 continue;
00824             }
00825 
00826             // Don't show CONNECT on dark wizards to mortals.
00827             //
00828             if (  isPlayer(target)
00829                && (fbe->flagvalue == CONNECTED)
00830                && (fbe->flagflag == FLAG_WORD2)
00831                && Hidden(target)
00832                && !See_Hidden(player))
00833             {
00834                 continue;
00835             }
00836             safe_mb_chr(' ', buff, &bp);
00837             safe_mb_str(fp->flagname, buff, &bp);
00838         }
00839     }
00840 
00841     // Terminate the string, and return the buffer to the caller.
00842     //
00843     *bp = '\0';
00844     return buff;
00845 }

static bool flag_rename ( char *  alias,
char *  newname 
) [static]

Definition at line 1151 of file flags.cpp.

References alloc_sbuf, flag_name_entry::flagname, statedata::flags_htab, free_sbuf, hashaddLEN(), hashfindLEN(), MakeCanonicalFlagName(), MEMFREE, mudstate, mux_strupr(), flag_name_entry::pOrigName, and StringCloneLen().

Referenced by CF_HAND(), and do_flag().

01152 {
01153     int nAlias;
01154     bool bValidAlias;
01155     char *pCheckedAlias = MakeCanonicalFlagName(alias, &nAlias, &bValidAlias);
01156     if (!bValidAlias)
01157     {
01158         return false;
01159     }
01160     char *pAlias = alloc_sbuf("flag_rename.old");
01161     memcpy(pAlias, pCheckedAlias, nAlias+1);
01162 
01163     int nNewName;
01164     bool bValidNewName;
01165     char *pCheckedNewName = MakeCanonicalFlagName(newname, &nNewName, &bValidNewName);
01166     if (!bValidNewName)
01167     {
01168         free_sbuf(pAlias);
01169         return false;
01170     }
01171     char *pNewName = alloc_sbuf("flag_rename.new");
01172     memcpy(pNewName, pCheckedNewName, nNewName+1);
01173 
01174     FLAGNAMEENT *flag1;
01175     flag1 = (FLAGNAMEENT *)hashfindLEN(pAlias, nAlias, &mudstate.flags_htab);
01176     if (flag1 != NULL)
01177     {
01178         FLAGNAMEENT *flag2;
01179         flag2 = (FLAGNAMEENT *)hashfindLEN(pNewName, nNewName, &mudstate.flags_htab);
01180         if (flag2 == NULL)
01181         {
01182             hashaddLEN(pNewName, nNewName, flag1, &mudstate.flags_htab);
01183 
01184             if (flag1->flagname != flag1->pOrigName)
01185             {
01186                 MEMFREE(flag1->flagname);
01187             }
01188             flag1->flagname = StringCloneLen(pNewName, nNewName);
01189             mux_strupr(flag1->flagname);
01190 
01191             free_sbuf(pAlias);
01192             free_sbuf(pNewName);
01193             return true;
01194         }
01195     }
01196     free_sbuf(pAlias);
01197     free_sbuf(pNewName);
01198     return false;
01199 }

void flag_set ( dbref  target,
dbref  player,
char *  flag,
int  key 
)

Definition at line 569 of file flags.cpp.

References flag_name_entry::bPositive, flag_name_entry::fbe, find_flag(), flag_bit_entry::flagflag, flag_bit_entry::flagvalue, flag_bit_entry::handler, mux_isspace, NOPERM_MESSAGE, notify, Quiet, and SET_QUIET.

Referenced by do_set(), and FUNCTION().

00570 {
00571     bool bDone = false;
00572 
00573     do
00574     {
00575         // Trim spaces, and handle the negation character.
00576         //
00577         while (mux_isspace(*flag))
00578         {
00579             flag++;
00580         }
00581 
00582         bool bNegate = false;
00583         if (*flag == '!')
00584         {
00585             bNegate = true;
00586             do
00587             {
00588                 flag++;
00589             } while (mux_isspace(*flag));
00590         }
00591 
00592         // Beginning of flag name is now 'flag'.
00593         //
00594         char *nflag = flag;
00595         while (  *nflag != '\0'
00596               && !mux_isspace(*nflag))
00597         {
00598             nflag++;
00599         }
00600         if (*nflag == '\0')
00601         {
00602             bDone = true;
00603         }
00604         else
00605         {
00606             *nflag = '\0';
00607         }
00608 
00609         // Make sure a flag name was specified.
00610         //
00611         if (*flag == '\0')
00612         {
00613             if (bNegate)
00614             {
00615                 notify(player, "You must specify a flag to clear.");
00616             }
00617             else
00618             {
00619                 notify(player, "You must specify a flag to set.");
00620             }
00621         }
00622         else
00623         {
00624             FLAGNAMEENT *fp = find_flag(flag);
00625             if (!fp)
00626             {
00627                 notify(player, "I do not understand that flag.");
00628             }
00629             else
00630             {
00631                 FLAGBITENT *fbe = fp->fbe;
00632 
00633                 bool bClearSet = bNegate;
00634                 if (!fp->bPositive)
00635                 {
00636                     bNegate = !bNegate;
00637                 }
00638 
00639                 // Invoke the flag handler, and print feedback.
00640                 //
00641                 if (!fbe->handler(target, player, fbe->flagvalue, fbe->flagflag, bNegate))
00642                 {
00643                     notify(player, NOPERM_MESSAGE);
00644                 }
00645                 else if (!(key & SET_QUIET) && !Quiet(player))
00646                 {
00647                     notify(player, (bClearSet ? "Cleared." : "Set."));
00648                 }
00649             }
00650         }
00651         flag = nflag + 1;
00652 
00653     } while (!bDone);
00654 }

bool has_flag ( dbref  player,
dbref  it,
char *  flagname 
)

Definition at line 737 of file flags.cpp.

References flag_name_entry::bPositive, CA_ADMIN, CA_GOD, CA_STAFF, CA_WIZARD, CONNECTED, db, flag_name_entry::fbe, find_flag(), FLAG_WORD2, flag_bit_entry::flagflag, flag_bit_entry::flagvalue, object::fs, God, Hidden, isPlayer, flag_bit_entry::listperm, See_Hidden, Staff, Wizard, WizRoy, and flagset::word.

Referenced by do_wipe(), and FUNCTION().

00738 {
00739     FLAGNAMEENT *fp = find_flag(flagname);
00740     if (!fp)
00741     {
00742         return false;
00743     }
00744     FLAGBITENT *fbe = fp->fbe;
00745 
00746     if (  (  fp->bPositive
00747           && (db[it].fs.word[fbe->flagflag] & fbe->flagvalue))
00748        || (  !fp->bPositive
00749           && (db[it].fs.word[fbe->flagflag] & fbe->flagvalue) == 0))
00750     {
00751         if (  (  (fbe->listperm & CA_STAFF)
00752               && !Staff(player))
00753            || (  (fbe->listperm & CA_ADMIN)
00754               && !WizRoy(player))
00755            || (  (fbe->listperm & CA_WIZARD)
00756               && !Wizard(player))
00757            || (  (fbe->listperm & CA_GOD)
00758               && !God(player)))
00759         {
00760             return false;
00761         }
00762 
00763         // Don't show CONNECT on dark wizards to mortals
00764         //
00765         if (  isPlayer(it)
00766            && (fbe->flagvalue == CONNECTED)
00767            && (fbe->flagflag == FLAG_WORD2)
00768            && Hidden(it)
00769            && !See_Hidden(player))
00770         {
00771             return false;
00772         }
00773         return true;
00774     }
00775     return false;
00776 }

void init_flagtab ( void   ) 

Definition at line 462 of file flags.cpp.

References alloc_sbuf, statedata::flags_htab, gen_flag_names, hashaddLEN(), hashfindLEN(), mudstate, mux_strlwr(), flag_name_entry::pOrigName, and SBUF_SIZE.

Referenced by main().

00463 {
00464     char *nbuf = alloc_sbuf("init_flagtab");
00465     for (FLAGNAMEENT *fp = gen_flag_names; fp->pOrigName; fp++)
00466     {
00467         fp->flagname = fp->pOrigName;
00468         strncpy(nbuf, fp->pOrigName, SBUF_SIZE);
00469         nbuf[SBUF_SIZE-1] = '\0';
00470         mux_strlwr(nbuf);
00471         if (!hashfindLEN(nbuf, strlen(nbuf), &mudstate.flags_htab))
00472         {
00473             hashaddLEN(nbuf, strlen(nbuf), fp, &mudstate.flags_htab);
00474         }
00475     }
00476     free_sbuf(nbuf);
00477 }

char* MakeCanonicalFlagName ( const char *  pName,
int *  pnName,
bool *  pbValid 
)

Definition at line 519 of file flags.cpp.

References mux_tolower, and SBUF_SIZE.

Referenced by CF_HAND(), do_flag(), find_flag(), and flag_rename().

00524 {
00525     static char buff[SBUF_SIZE];
00526     char *p = buff;
00527     int nName = 0;
00528 
00529     while (*pName && nName < SBUF_SIZE)
00530     {
00531         *p = mux_tolower(*pName);
00532         p++;
00533         pName++;
00534         nName++;
00535     }
00536     *p = '\0';
00537     if (nName < SBUF_SIZE)
00538     {
00539         *pnName = nName;
00540         *pbValid = true;
00541         return buff;
00542     }
00543     else
00544     {
00545         *pnName = 0;
00546         *pbValid = false;
00547         return NULL;
00548     }
00549 }

char* unparse_object ( dbref  player,
dbref  target,
bool  obey_myopic 
)

Definition at line 884 of file flags.cpp.

References ABODE, alloc_lbuf, ANSI_ENDGOAL_NORMAL, ANSI_TruncateToField(), aszSpecialDBRefNames, CHOWN_OK, db, decode_flags(), DESTROY_OK, Examinable, Flags, Flags2, free_sbuf, Good_obj, JUMP_OK, LBUF_SIZE, LINK_OK, Moniker(), MyopicExam, NOPERM, safe_chr, safe_ltoa(), and safe_str.

Referenced by do_channelwho(), do_chopen(), do_comwho_line(), do_entrances(), do_examine(), do_find(), do_inventory(), do_malias_create(), do_search(), log_name(), look_contents(), look_in(), look_simple(), ShowPsLine(), and unparse_boolexp1().

00885 {
00886     char *buf = alloc_lbuf("unparse_object");
00887     if (NOPERM <= target && target < 0)
00888     {
00889         strcpy(buf, aszSpecialDBRefNames[-target]);
00890     }
00891     else if (!Good_obj(target))
00892     {
00893         sprintf(buf, "*ILLEGAL*(#%d)", target);
00894     }
00895     else
00896     {
00897         bool exam;
00898         if (obey_myopic)
00899         {
00900             exam = MyopicExam(player, target);
00901         }
00902         else
00903         {
00904             exam = Examinable(player, target);
00905         }
00906         if (  exam
00907            || (Flags(target) & (CHOWN_OK | JUMP_OK | LINK_OK | DESTROY_OK))
00908            || (Flags2(target) & ABODE))
00909         {
00910             // show everything
00911             //
00912             char *fp = decode_flags(player, &(db[target].fs));
00913 
00914             // Leave 100 bytes on the end for the dbref and flags.
00915             //
00916             int vw;
00917             size_t nLen = ANSI_TruncateToField(Moniker(target), LBUF_SIZE-100,
00918                 buf, LBUF_SIZE, &vw, ANSI_ENDGOAL_NORMAL);
00919             char *bp = buf + nLen;
00920 
00921             safe_str("(#", buf, &bp);
00922             safe_ltoa(target, buf, &bp);
00923             safe_str(fp, buf, &bp);
00924             safe_chr(')', buf, &bp);
00925             *bp = '\0';
00926 
00927             free_sbuf(fp);
00928         }
00929         else
00930         {
00931             // show only the name.
00932             //
00933             strcpy(buf, Moniker(target));
00934         }
00935     }
00936     return buf;
00937 }

char* unparse_object_numonly ( dbref  target  ) 

Definition at line 852 of file flags.cpp.

References alloc_lbuf, ANSI_ENDGOAL_NORMAL, ANSI_TruncateToField(), aszSpecialDBRefNames, Good_obj, LBUF_SIZE, Name, safe_chr, safe_ltoa(), and safe_str.

Referenced by log_name().

00853 {
00854     char *buf = alloc_lbuf("unparse_object_numonly");
00855     if (target < 0)
00856     {
00857         strcpy(buf, aszSpecialDBRefNames[-target]);
00858     }
00859     else if (!Good_obj(target))
00860     {
00861         sprintf(buf, "*ILLEGAL*(#%d)", target);
00862     }
00863     else
00864     {
00865         // Leave 100 bytes on the end for the dbref.
00866         //
00867         int vw;
00868         size_t nLen = ANSI_TruncateToField(Name(target), LBUF_SIZE-100,
00869             buf, LBUF_SIZE, &vw, ANSI_ENDGOAL_NORMAL);
00870         char *bp = buf + nLen;
00871 
00872         safe_str("(#", buf, &bp);
00873         safe_ltoa(target, buf, &bp);
00874         safe_chr(')', buf, &bp);
00875         *bp = '\0';
00876     }
00877     return buf;
00878 }


Variable Documentation

FLAGBITENT fbeAbode = { ABODE, 'A', FLAG_WORD2, 0, fh_any} [static]

Definition at line 266 of file flags.cpp.

FLAGBITENT fbeAnsi = { ANSI, 'X', FLAG_WORD2, 0, fh_any} [static]

Definition at line 267 of file flags.cpp.

FLAGBITENT fbeAudible = { HEARTHRU, 'a', FLAG_WORD1, 0, fh_hear_bit} [static]

Definition at line 268 of file flags.cpp.

FLAGBITENT fbeAuditorium = { AUDITORIUM, 'b', FLAG_WORD2, 0, fh_any} [static]

Definition at line 269 of file flags.cpp.

FLAGBITENT fbeBlind = { BLIND, 'B', FLAG_WORD2, 0, fh_wiz} [static]

Definition at line 270 of file flags.cpp.

FLAGBITENT fbeChownOk = { CHOWN_OK, 'C', FLAG_WORD1, 0, fh_any} [static]

Definition at line 271 of file flags.cpp.

FLAGBITENT fbeConnected = { CONNECTED, 'c', FLAG_WORD2, CA_NO_DECOMP, fh_god} [static]

Definition at line 272 of file flags.cpp.

FLAGBITENT fbeDark = { DARK, 'D', FLAG_WORD1, 0, fh_dark_bit} [static]

Definition at line 273 of file flags.cpp.

FLAGBITENT fbeDestroyOk = { DESTROY_OK, 'd', FLAG_WORD1, 0, fh_any} [static]

Definition at line 274 of file flags.cpp.

FLAGBITENT fbeEnterOk = { ENTER_OK, 'e', FLAG_WORD1, 0, fh_any} [static]

Definition at line 275 of file flags.cpp.

FLAGBITENT fbeFixed = { FIXED, 'f', FLAG_WORD2, 0, fh_restrict_player} [static]

Definition at line 276 of file flags.cpp.

FLAGBITENT fbeFloating = { FLOATING, 'F', FLAG_WORD2, 0, fh_any} [static]

Definition at line 277 of file flags.cpp.

FLAGBITENT fbeGagged = { GAGGED, 'j', FLAG_WORD2, 0, fh_wiz} [static]

Definition at line 278 of file flags.cpp.

FLAGBITENT fbeGoing = { GOING, 'G', FLAG_WORD1, CA_NO_DECOMP, fh_going_bit} [static]

Definition at line 279 of file flags.cpp.

FLAGBITENT fbeHalted = { HALT, 'h', FLAG_WORD1, 0, fh_any} [static]

Definition at line 280 of file flags.cpp.

FLAGBITENT fbeHasDaily = { HAS_DAILY, '*', FLAG_WORD2, CA_GOD|CA_NO_DECOMP, fh_god} [static]

Definition at line 281 of file flags.cpp.

FLAGBITENT fbeHasForwardList = { HAS_FWDLIST, '&', FLAG_WORD2, CA_GOD|CA_NO_DECOMP, fh_god} [static]

Definition at line 282 of file flags.cpp.

FLAGBITENT fbeHasListen = { HAS_LISTEN, '@', FLAG_WORD2, CA_GOD|CA_NO_DECOMP, fh_god} [static]

Definition at line 283 of file flags.cpp.

FLAGBITENT fbeHasStartup = { HAS_STARTUP, '+', FLAG_WORD1, CA_GOD|CA_NO_DECOMP, fh_god} [static]

Definition at line 284 of file flags.cpp.

FLAGBITENT fbeHaven = { HAVEN, 'H', FLAG_WORD1, 0, fh_any} [static]

Definition at line 285 of file flags.cpp.

FLAGBITENT fbeHead = { HEAD_FLAG, '?', FLAG_WORD2, 0, fh_wiz} [static]

Definition at line 286 of file flags.cpp.

FLAGBITENT fbeHtml = { HTML, '(', FLAG_WORD2, 0, fh_any} [static]

Definition at line 287 of file flags.cpp.

FLAGBITENT fbeImmortal = { IMMORTAL, 'i', FLAG_WORD1, 0, fh_wiz} [static]

Definition at line 288 of file flags.cpp.

FLAGBITENT fbeInherit = { INHERIT, 'I', FLAG_WORD1, 0, fh_inherit} [static]

Definition at line 289 of file flags.cpp.

FLAGBITENT fbeJumpOk = { JUMP_OK, 'J', FLAG_WORD1, 0, fh_any} [static]

Definition at line 290 of file flags.cpp.

FLAGBITENT fbeKeepAlive = { CKEEPALIVE, 'k', FLAG_WORD2, 0, fh_any} [static]

Definition at line 291 of file flags.cpp.

FLAGBITENT fbeKey = { KEY, 'K', FLAG_WORD2, 0, fh_any} [static]

Definition at line 292 of file flags.cpp.

FLAGBITENT fbeLight = { LIGHT, 'l', FLAG_WORD2, 0, fh_any} [static]

Definition at line 293 of file flags.cpp.

FLAGBITENT fbeLinkOk = { LINK_OK, 'L', FLAG_WORD1, 0, fh_any} [static]

Definition at line 294 of file flags.cpp.

FLAGBITENT fbeMarker0 = { MARK_0, '0', FLAG_WORD3, 0, fh_god} [static]

Definition at line 346 of file flags.cpp.

FLAGBITENT fbeMarker1 = { MARK_1, '1', FLAG_WORD3, 0, fh_god} [static]

Definition at line 347 of file flags.cpp.

FLAGBITENT fbeMarker2 = { MARK_2, '2', FLAG_WORD3, 0, fh_god} [static]

Definition at line 348 of file flags.cpp.

FLAGBITENT fbeMarker3 = { MARK_3, '3', FLAG_WORD3, 0, fh_god} [static]

Definition at line 349 of file flags.cpp.

FLAGBITENT fbeMarker4 = { MARK_4, '4', FLAG_WORD3, 0, fh_god} [static]

Definition at line 350 of file flags.cpp.

FLAGBITENT fbeMarker5 = { MARK_5, '5', FLAG_WORD3, 0, fh_god} [static]

Definition at line 351 of file flags.cpp.

FLAGBITENT fbeMarker6 = { MARK_6, '6', FLAG_WORD3, 0, fh_god} [static]

Definition at line 352 of file flags.cpp.

FLAGBITENT fbeMarker7 = { MARK_7, '7', FLAG_WORD3, 0, fh_god} [static]

Definition at line 353 of file flags.cpp.

FLAGBITENT fbeMarker8 = { MARK_8, '8', FLAG_WORD3, 0, fh_god} [static]

Definition at line 354 of file flags.cpp.

FLAGBITENT fbeMarker9 = { MARK_9, '9', FLAG_WORD3, 0, fh_god} [static]

Definition at line 355 of file flags.cpp.

FLAGBITENT fbeMonitor = { MONITOR, 'M', FLAG_WORD1, 0, fh_hear_bit} [static]

Definition at line 295 of file flags.cpp.

FLAGBITENT fbeMyopic = { MYOPIC, 'm', FLAG_WORD1, 0, fh_any} [static]

Definition at line 296 of file flags.cpp.

FLAGBITENT fbeNoAccents = { NOACCENTS, '~', FLAG_WORD2, 0, fh_any} [static]

Definition at line 298 of file flags.cpp.

FLAGBITENT fbeNoBleed = { NOBLEED, '-', FLAG_WORD2, 0, fh_any} [static]

Definition at line 299 of file flags.cpp.

FLAGBITENT fbeNoCommand = { NO_COMMAND, 'n', FLAG_WORD2, 0, fh_any} [static]

Definition at line 297 of file flags.cpp.

FLAGBITENT fbeNoSpoof = { NOSPOOF, 'N', FLAG_WORD1, 0, fh_any} [static]

Definition at line 300 of file flags.cpp.

FLAGBITENT fbeOpaque = { TM_OPAQUE, 'O', FLAG_WORD1, 0, fh_any} [static]

Definition at line 301 of file flags.cpp.

FLAGBITENT fbeOpenOk = { OPEN_OK, 'z', FLAG_WORD2, 0, fh_wiz} [static]

Definition at line 302 of file flags.cpp.

FLAGBITENT fbeParentOk = { PARENT_OK, 'Y', FLAG_WORD2, 0, fh_any} [static]

Definition at line 303 of file flags.cpp.

FLAGBITENT fbePlayerMails = { PLAYER_MAILS, ' ', FLAG_WORD2, CA_GOD|CA_NO_DECOMP, fh_god} [static]

Definition at line 304 of file flags.cpp.

FLAGBITENT fbePuppet = { PUPPET, 'p', FLAG_WORD1, 0, fh_hear_bit} [static]

Definition at line 305 of file flags.cpp.

FLAGBITENT fbeQuiet = { QUIET, 'Q', FLAG_WORD1, 0, fh_any} [static]

Definition at line 306 of file flags.cpp.

FLAGBITENT fbeRobot = { ROBOT, 'r', FLAG_WORD1, 0, fh_player_bit} [static]

Definition at line 307 of file flags.cpp.

FLAGBITENT fbeRoyalty = { ROYALTY, 'Z', FLAG_WORD1, 0, fh_wiz} [static]

Definition at line 308 of file flags.cpp.

FLAGBITENT fbeSafe = { SAFE, 's', FLAG_WORD1, 0, fh_any} [static]

Definition at line 309 of file flags.cpp.

FLAGBITENT fbeSitemon = { SITEMON, '$', FLAG_WORD3, 0, fh_wiz} [static]

Definition at line 323 of file flags.cpp.

FLAGBITENT fbeSlave = { SLAVE, 'x', FLAG_WORD2, CA_WIZARD, fh_wiz} [static]

Definition at line 310 of file flags.cpp.

FLAGBITENT fbeStaff = { STAFF, 'w', FLAG_WORD2, 0, fh_wiz} [static]

Definition at line 311 of file flags.cpp.

FLAGBITENT fbeSticky = { STICKY, 'S', FLAG_WORD1, 0, fh_any} [static]

Definition at line 312 of file flags.cpp.

FLAGBITENT fbeSuspect = { SUSPECT, 'u', FLAG_WORD2, CA_WIZARD, fh_wiz} [static]

Definition at line 313 of file flags.cpp.

FLAGBITENT fbeTerse = { TERSE, 'q', FLAG_WORD1, 0, fh_any} [static]

Definition at line 314 of file flags.cpp.

FLAGBITENT fbeTrace = { TRACE, 'T', FLAG_WORD1, 0, fh_any} [static]

Definition at line 315 of file flags.cpp.

FLAGBITENT fbeTransparent = { SEETHRU, 't', FLAG_WORD1, 0, fh_any} [static]

Definition at line 316 of file flags.cpp.

FLAGBITENT fbeUnfindable = { UNFINDABLE, 'U', FLAG_WORD2, 0, fh_any} [static]

Definition at line 317 of file flags.cpp.

FLAGBITENT fbeUninspected = { UNINSPECTED, 'g', FLAG_WORD2, 0, fh_wizroy} [static]

Definition at line 318 of file flags.cpp.

FLAGBITENT fbeVacation = { VACATION, '|', FLAG_WORD2, 0, fh_restrict_player} [static]

Definition at line 319 of file flags.cpp.

FLAGBITENT fbeVerbose = { VERBOSE, 'v', FLAG_WORD1, 0, fh_any} [static]

Definition at line 320 of file flags.cpp.

FLAGBITENT fbeVisual = { VISUAL, 'V', FLAG_WORD1, 0, fh_any} [static]

Definition at line 321 of file flags.cpp.

FLAGBITENT fbeWizard = { WIZARD, 'W', FLAG_WORD1, 0, fh_god} [static]

Definition at line 322 of file flags.cpp.

FLAGNAMEENT gen_flag_names[]

Definition at line 358 of file flags.cpp.

Referenced by convert_flags(), decode_flags(), decompile_flags(), display_flagtab(), flag_description(), FUNCTION(), and init_flagtab().

OBJENT object_types[8]

Initial value:

{
    {"ROOM",    'R', CA_PUBLIC, OF_CONTENTS|OF_EXITS|OF_DROPTO|OF_HOME},
    {"THING",   ' ', CA_PUBLIC, OF_CONTENTS|OF_LOCATION|OF_EXITS|OF_HOME|OF_SIBLINGS},
    {"EXIT",    'E', CA_PUBLIC, OF_SIBLINGS},
    {"PLAYER",  'P', CA_PUBLIC, OF_CONTENTS|OF_LOCATION|OF_EXITS|OF_HOME|OF_OWNER|OF_SIBLINGS},
    {"TYPE5",   '+', CA_GOD,    0},
    {"GARBAGE", '-', CA_PUBLIC, OF_CONTENTS|OF_LOCATION|OF_EXITS|OF_HOME|OF_SIBLINGS},
    {"GARBAGE", '#', CA_GOD,    0}
}

Definition at line 447 of file flags.cpp.

Referenced by convert_flags(), decode_flags(), do_destroy(), and flag_description().


Generated on Mon May 28 04:40:16 2007 for MUX by  doxygen 1.4.7