mux/src/flags.h File Reference

#include "copyright.h"

Include dependency graph for flags.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  flag_bit_entry
struct  flag_name_entry
struct  object_entry
struct  flagset

Defines

#define FLAG_WORD1   0x0
#define FLAG_WORD2   0x1
#define FLAG_WORD3   0x2
#define TYPE_ROOM   0x0
#define TYPE_THING   0x1
#define TYPE_EXIT   0x2
#define TYPE_PLAYER   0x3
#define TYPE_GARBAGE   0x5
#define NOTYPE   0x7
#define TYPE_MASK   0x7
#define SEETHRU   0x00000008
#define WIZARD   0x00000010
#define LINK_OK   0x00000020
#define DARK   0x00000040
#define JUMP_OK   0x00000080
#define STICKY   0x00000100
#define DESTROY_OK   0x00000200
#define HAVEN   0x00000400
#define QUIET   0x00000800
#define HALT   0x00001000
#define TRACE   0x00002000
#define GOING   0x00004000
#define MONITOR   0x00008000
#define MYOPIC   0x00010000
#define PUPPET   0x00020000
#define CHOWN_OK   0x00040000
#define ENTER_OK   0x00080000
#define VISUAL   0x00100000
#define IMMORTAL   0x00200000
#define HAS_STARTUP   0x00400000
#define TM_OPAQUE   0x00800000
#define VERBOSE   0x01000000
#define INHERIT   0x02000000
#define NOSPOOF   0x04000000
#define ROBOT   0x08000000
#define SAFE   0x10000000
#define ROYALTY   0x20000000
#define HEARTHRU   0x40000000
#define TERSE   0x80000000
#define KEY   0x00000001
#define ABODE   0x00000002
#define FLOATING   0x00000004
#define UNFINDABLE   0x00000008
#define PARENT_OK   0x00000010
#define LIGHT   0x00000020
#define HAS_LISTEN   0x00000040
#define HAS_FWDLIST   0x00000080
#define AUDITORIUM   0x00000100
#define ANSI   0x00000200
#define HEAD_FLAG   0x00000400
#define FIXED   0x00000800
#define UNINSPECTED   0x00001000
#define NO_COMMAND   0x00002000
#define CKEEPALIVE   0x00004000
#define NOBLEED   0x00008000
#define STAFF   0x00010000
#define HAS_DAILY   0x00020000
#define GAGGED   0x00040000
#define OPEN_OK   0x00080000
#define VACATION   0x01000000
#define PLAYER_MAILS   0x02000000
#define HTML   0x04000000
#define BLIND   0x08000000
#define SUSPECT   0x10000000
#define NOACCENTS   0x20000000
#define CONNECTED   0x40000000
#define SLAVE   0x80000000
#define SITEMON   0x00000400
#define CMDCHECK   0x00000800
#define MARK_0   0x00400000
#define MARK_1   0x00800000
#define MARK_2   0x01000000
#define MARK_3   0x02000000
#define MARK_4   0x04000000
#define MARK_5   0x08000000
#define MARK_6   0x10000000
#define MARK_7   0x20000000
#define MARK_8   0x40000000
#define MARK_9   0x80000000
#define OF_CONTENTS   0x0001
#define OF_LOCATION   0x0002
#define OF_EXITS   0x0004
#define OF_HOME   0x0008
#define OF_DROPTO   0x0010
#define OF_OWNER   0x0020
#define OF_SIBLINGS   0x0040
#define GOD   ((dbref) 1)
#define Typeof(x)   (Flags(x) & TYPE_MASK)
#define God(x)   ((x) == GOD)
#define Robot(x)   (isPlayer(x) && ((Flags(x) & ROBOT) != 0))
#define OwnsOthers(x)   ((object_types[Typeof(x)].flags & OF_OWNER) != 0)
#define Has_location(x)   ((object_types[Typeof(x)].flags & OF_LOCATION) != 0)
#define Has_contents(x)   ((object_types[Typeof(x)].flags & OF_CONTENTS) != 0)
#define Has_exits(x)   ((object_types[Typeof(x)].flags & OF_EXITS) != 0)
#define Has_siblings(x)   ((object_types[Typeof(x)].flags & OF_SIBLINGS) != 0)
#define Has_home(x)   ((object_types[Typeof(x)].flags & OF_HOME) != 0)
#define Has_dropto(x)   ((object_types[Typeof(x)].flags & OF_DROPTO) != 0)
#define Home_ok(x)   ((object_types[Typeof(x)].flags & OF_HOME) != 0)
#define isPlayer(x)   (Typeof(x) == TYPE_PLAYER)
#define isRoom(x)   (Typeof(x) == TYPE_ROOM)
#define isExit(x)   (Typeof(x) == TYPE_EXIT)
#define isThing(x)   (Typeof(x) == TYPE_THING)
#define isGarbage(x)   (Typeof(x) == TYPE_GARBAGE)
#define Good_dbref(x)   (((x) >= 0) && ((x) < mudstate.db_top))
#define Good_obj(x)   (Good_dbref(x) && (Typeof(x) < TYPE_GARBAGE))
#define Good_owner(x)   (Good_obj(x) && OwnsOthers(x))
#define Staff(x)   (Wizard(x) || Royalty(x) || ((Flags2(x) & STAFF) != 0))
#define Royalty(x)
#define WizRoy(x)   (Royalty(x) || Wizard(x))
#define Head(x)   ((Flags2(x) & HEAD_FLAG) != 0)
#define Fixed(x)   ((Flags2(x) & FIXED) != 0)
#define Uninspected(x)   ((Flags2(x) & UNINSPECTED) != 0)
#define Ansi(x)   ((Flags2(x) & ANSI) != 0)
#define NoAccents(x)   ((Flags2(x) & NOACCENTS) != 0)
#define No_Command(x)   ((Flags2(x) & NO_COMMAND) != 0)
#define NoBleed(x)   ((Flags2(x) & NOBLEED) != 0)
#define KeepAlive(x)   ((Flags2(x) & CKEEPALIVE) != 0)
#define Transparent(x)   ((Flags(x) & SEETHRU) != 0)
#define Link_ok(x)   (((Flags(x) & LINK_OK) != 0) && Has_contents(x))
#define Open_ok(x)   (((Flags2(x) & OPEN_OK) != 0) && Has_exits(x))
#define Wizard(x)
#define Dark(x)
#define Jump_ok(x)   (((Flags(x) & JUMP_OK) != 0) && Has_contents(x))
#define Sticky(x)   ((Flags(x) & STICKY) != 0)
#define Destroy_ok(x)   ((Flags(x) & DESTROY_OK) != 0)
#define Haven(x)   ((Flags(x) & HAVEN) != 0)
#define Player_haven(x)   ((Flags(Owner(x)) & HAVEN) != 0)
#define Quiet(x)   ((Flags(x) & QUIET) != 0)
#define Halted(x)   ((Flags(x) & HALT) != 0)
#define Trace(x)   ((Flags(x) & TRACE) != 0)
#define Going(x)   ((Flags(x) & GOING) != 0)
#define Monitor(x)   ((Flags(x) & MONITOR) != 0)
#define Myopic(x)   ((Flags(x) & MYOPIC) != 0)
#define Puppet(x)   ((Flags(x) & PUPPET) != 0)
#define Chown_ok(x)   ((Flags(x) & CHOWN_OK) != 0)
#define Enter_ok(x)
#define Immortal(x)
#define Opaque(x)   ((Flags(x) & TM_OPAQUE) != 0)
#define Verbose(x)   ((Flags(x) & VERBOSE) != 0)
#define Inherits(x)
#define Nospoof(x)   ((Flags(x) & NOSPOOF) != 0)
#define Safe(x, p)
#define Audible(x)   ((Flags(x) & HEARTHRU) != 0)
#define Terse(x)   ((Flags(x) & TERSE) != 0)
#define Gagged(x)   ((Flags2(x) & GAGGED) != 0)
#define Vacation(x)   ((Flags2(x) & VACATION) != 0)
#define Key(x)   ((Flags2(x) & KEY) != 0)
#define Abode(x)   (((Flags2(x) & ABODE) != 0) && Home_ok(x))
#define Auditorium(x)   ((Flags2(x) & AUDITORIUM) != 0)
#define Floating(x)   ((Flags2(x) & FLOATING) != 0)
#define Findable(x)   ((Flags2(x) & UNFINDABLE) == 0)
#define Hideout(x)   ((Flags2(x) & UNFINDABLE) != 0)
#define Parent_ok(x)   ((Flags2(x) & PARENT_OK) != 0)
#define Light(x)   ((Flags2(x) & LIGHT) != 0)
#define Suspect(x)   ((Flags2(Owner(x)) & SUSPECT) != 0)
#define Connected(x)
#define Slave(x)   ((Flags2(Owner(x)) & SLAVE) != 0)
#define Hidden(x)   ((Flags(x) & DARK) != 0)
#define Blind(x)   ((Flags2(x) & BLIND) != 0)
#define H_Startup(x)   ((Flags(x) & HAS_STARTUP) != 0)
#define H_Fwdlist(x)   ((Flags2(x) & HAS_FWDLIST) != 0)
#define H_Listen(x)   ((Flags2(x) & HAS_LISTEN) != 0)
#define s_Halted(x)   s_Flags((x), FLAG_WORD1, Flags(x) | HALT)
#define s_Going(x)   s_Flags((x), FLAG_WORD1, Flags(x) | GOING)
#define s_Connected(x)   s_Flags((x), FLAG_WORD2, Flags2(x) | CONNECTED)
#define c_Connected(x)   s_Flags((x), FLAG_WORD2, Flags2(x) & ~CONNECTED)
#define SiteMon(x)   ((Flags3(x) & SITEMON) != 0)
#define CmdCheck(x)   ((Flags3(x) & CMDCHECK) != 0)
#define Parentable(p, x)
#define Examinable(p, x)
#define MyopicExam(p, x)
#define Controls(p, x)
#define Mark(x)
#define Unmark(x)
#define Marked(x)
#define Mark_all(i)
#define Unmark_all(i)
#define Link_exit(p, x)
#define Linkable(p, x)
#define See_attr(p, x, a)   (!((a)->flags & AF_IS_LOCK) && bCanReadAttr(p,x,a,false))
#define See_attr_explicit(p, x, a, o, f)
#define Has_power(p, x)   (check_access((p),powers_nametab[x].flag))
#define Html(x)   ((Flags2(x) & HTML) != 0)
#define s_Html(x)   s_Flags((x), FLAG_WORD2, Flags2(x) | HTML)

Typedefs

typedef flag_bit_entry FLAGBITENT
typedef flag_name_entry FLAGNAMEENT
typedef object_entry OBJENT
typedef flagset FLAGSET

Functions

void init_flagtab (void)
void display_flagtab (dbref)
void flag_set (dbref, dbref, char *, int)
char * flag_description (dbref, dbref)
char * decode_flags (dbref, FLAGSET *)
bool has_flag (dbref, dbref, char *)
char * unparse_object (dbref, dbref, bool)
char * unparse_object_numonly (dbref)
bool convert_flags (dbref, char *, FLAGSET *, FLAG *)
void decompile_flags (dbref, dbref, char *)
char * MakeCanonicalFlagName (const char *pName, int *pnName, bool *pbValid)

Variables

FLAGNAMEENT gen_flag_names []
OBJENT object_types [8]


Define Documentation

#define Abode (  )     (((Flags2(x) & ABODE) != 0) && Home_ok(x))

Definition at line 300 of file flags.h.

Referenced by can_set_home().

#define ABODE   0x00000002

Definition at line 58 of file flags.h.

Referenced by unparse_object().

#define Ansi (  )     ((Flags2(x) & ANSI) != 0)

Definition at line 256 of file flags.h.

Referenced by queue_string().

#define ANSI   0x00000200

Definition at line 66 of file flags.h.

#define Audible (  )     ((Flags(x) & HEARTHRU) != 0)

Definition at line 294 of file flags.h.

Referenced by notify_check(), and sweep_check().

#define Auditorium (  )     ((Flags2(x) & AUDITORIUM) != 0)

Definition at line 301 of file flags.h.

Referenced by sp_ok().

#define AUDITORIUM   0x00000100

Definition at line 65 of file flags.h.

#define Blind (  )     ((Flags2(x) & BLIND) != 0)

Definition at line 312 of file flags.h.

Referenced by process_enter_loc(), and process_leave_loc().

#define BLIND   0x08000000

Definition at line 80 of file flags.h.

#define c_Connected (  )     s_Flags((x), FLAG_WORD2, Flags2(x) & ~CONNECTED)

Definition at line 321 of file flags.h.

Referenced by announce_disconnect(), and db_read().

#define Chown_ok (  )     ((Flags(x) & CHOWN_OK) != 0)

Definition at line 281 of file flags.h.

Referenced by do_chown().

#define CHOWN_OK   0x00040000

Definition at line 41 of file flags.h.

Referenced by chown_all(), do_chown(), and unparse_object().

#define CKEEPALIVE   0x00004000

Definition at line 71 of file flags.h.

#define CmdCheck (  )     ((Flags3(x) & CMDCHECK) != 0)

Definition at line 323 of file flags.h.

Referenced by do_icmd(), and process_command().

#define CMDCHECK   0x00000800

Definition at line 103 of file flags.h.

Referenced by do_icmd().

#define Connected (  ) 

Value:

(((Flags2(x) & CONNECTED) != 0) && \
                            (Typeof(x) == TYPE_PLAYER))

Definition at line 308 of file flags.h.

Referenced by can_see(), CGuests::Create(), do_comwho(), do_mail_list(), do_mail_read(), do_mail_review(), do_pemit_single(), do_prog(), do_quitprog(), FUNCTION(), Hearer(), CGuests::ListAll(), page_check(), process_sticky_dropto(), raw_notify(), raw_notify_html(), raw_notify_newline(), and sweep_check().

#define CONNECTED   0x40000000

Definition at line 83 of file flags.h.

Referenced by decode_flags(), flag_description(), FUNCTION(), handle_flaglists(), and has_flag().

#define Controls ( p,
 ) 

Value:

(Good_obj(x) && \
                            (!(God(x) && !God(p))) && \
                            (Control_All(p) || \
                            ((Owner(p) == Owner(x)) && \
                            (Inherits(p) || !Inherits(x))) || \
                            (check_zone(p,x))))

Definition at line 351 of file flags.h.

Referenced by atr_cpy(), bCanSetAttr(), can_set_home(), divest_object(), do_alias(), do_cemit(), do_chanlist(), do_channelwho(), do_chboot(), do_cheader(), do_chopen(), do_chown(), do_chzone(), do_clone(), do_destroy(), do_destroychannel(), do_drop(), do_editchannel(), do_enter(), do_enter_internal(), do_find(), do_forwardlist(), do_function(), do_get(), do_kill(), do_last(), do_leave(), do_link(), do_listchannels(), do_lock(), do_moniker(), do_move(), do_notify(), do_parent(), do_pemit_single(), do_teleport_single(), do_trigger(), do_unlink(), do_verb(), do_wait(), FUNCTION(), fwdlist_load(), get_stats(), give_thing(), link_exit(), match_controlled_handler(), match_possessed(), move_object(), nearby_or_control(), open_exit(), scan_zone(), sp_ok(), and view_atr().

#define Dark (  ) 

Value:

(((Flags(x) & DARK) != 0) && (Wizard(x) || \
                            !(isPlayer(x) || (Puppet(x) && Has_contents(x)))))

Definition at line 267 of file flags.h.

Referenced by can_see(), do_move(), do_sweep(), exit_displayable(), exit_visible(), FUNCTION(), look_contents(), look_exits(), match_exit_internal(), match_possessed(), move_exit(), move_via_exit(), process_enter_loc(), process_leave_loc(), and room_list().

#define DARK   0x00000040

Definition at line 29 of file flags.h.

Referenced by announce_connect(), announce_disconnect(), check_connect(), check_idle(), decode_flags(), and shovechars().

#define Destroy_ok (  )     ((Flags(x) & DESTROY_OK) != 0)

Definition at line 271 of file flags.h.

Referenced by do_destroy().

#define DESTROY_OK   0x00000200

Definition at line 32 of file flags.h.

Referenced by unparse_object().

#define Enter_ok (  ) 

Value:

(((Flags(x) & ENTER_OK) != 0) && \
                            Has_location(x) && Has_contents(x))

Definition at line 282 of file flags.h.

Referenced by do_enter_internal(), do_get(), give_thing(), and match_possessed().

#define ENTER_OK   0x00080000

Definition at line 42 of file flags.h.

#define Examinable ( p,
 ) 

Value:

(((Flags(x) & VISUAL) != 0) || \
                            (See_All(p)) || \
                            (Owner(p) == Owner(x)) || \
                            (check_zone(p,x)))

Definition at line 341 of file flags.h.

Referenced by bCanReadAttr(), do_clone(), do_decomp(), do_entrances(), do_examine(), do_sweep(), do_verb(), exam_wildattrs(), exit_visible(), FUNCTION(), grep_handler(), locatable(), look_contents(), look_simple(), match_exit_internal(), room_list(), and unparse_object().

#define Findable (  )     ((Flags2(x) & UNFINDABLE) == 0)

Definition at line 303 of file flags.h.

Referenced by locatable().

#define Fixed (  )     ((Flags2(x) & FIXED) != 0)

Definition at line 254 of file flags.h.

Referenced by do_move(), do_teleport(), and process_command().

#define FIXED   0x00000800

Definition at line 68 of file flags.h.

#define FLAG_WORD1   0x0

Definition at line 11 of file flags.h.

Referenced by announce_connect(), announce_disconnect(), atr_add_raw_LEN(), atr_clr(), CF_HAND(), cf_init(), check_connect(), check_idle(), chown_all(), convert_flags(), CGuests::Create(), create_obj(), db_make_minimal(), db_read(), decode_flags(), destroy_bad_obj(), destroy_obj(), do_chown(), do_clone(), do_command(), do_toad(), fh_any(), handle_flaglists(), initialize_objects(), link_exit(), list_df_flags(), CGuests::MakeGuestChar(), purge_going(), search_perform(), search_setup(), shovechars(), and Task_RunQueueEntry().

#define FLAG_WORD2   0x1

Definition at line 12 of file flags.h.

Referenced by announce_connect(), atr_add_raw_LEN(), atr_clr(), convert_flags(), db_make_minimal(), db_read(), decode_flags(), destroy_bad_obj(), destroy_obj(), do_toad(), flag_description(), FUNCTION(), handle_flaglists(), and has_flag().

#define FLAG_WORD3   0x2

Definition at line 13 of file flags.h.

Referenced by CF_HAND(), cf_init(), convert_flags(), db_make_minimal(), db_read(), destroy_bad_obj(), destroy_obj(), do_icmd(), do_toad(), handle_flaglists(), search_perform(), and search_setup().

#define Floating (  )     ((Flags2(x) & FLOATING) != 0)

Definition at line 302 of file flags.h.

Referenced by check_floating().

#define FLOATING   0x00000004

Definition at line 59 of file flags.h.

#define Gagged (  )     ((Flags2(x) & GAGGED) != 0)

Definition at line 297 of file flags.h.

Referenced by do_processcom(), and sp_ok().

#define GAGGED   0x00040000

Definition at line 75 of file flags.h.

#define God (  )     ((x) == GOD)

Definition at line 229 of file flags.h.

Referenced by atr_cpy(), bCanLockAttr(), bCanReadAttr(), bCanSetAttr(), boot_by_port(), check_access(), check_connect(), chown_all(), convert_flags(), decode_flags(), destroyable(), display_flagtab(), display_nametab(), display_powertab(), do_boot(), do_chown(), do_comwho(), do_icmd(), do_mail_nuke(), do_malias_list(), do_malias_list_all(), do_newpassword(), do_prog(), do_teleport_single(), fh_any(), fh_god(), fh_going_bit(), fh_privileged(), fh_staff(), flag_description(), FUNCTION(), fwdlist_load(), has_flag(), has_power(), interp_nametab(), list_cf_access(), listset_nametab(), load_comsystem(), lookup_player(), ph_god(), powers_list(), purge_comsystem(), return_bit(), test_atr(), and zonecmdtest().

#define GOD   ((dbref) 1)

Definition at line 180 of file flags.h.

Referenced by AssertionFailed(), CF_HAND(), cf_init(), check_dead_refs(), check_pass(), CGuests::Create(), db_write_object(), destroy_bad_obj(), destroy_obj(), CGuests::DestroyGuestChar(), do_chanlog(), do_malias_add(), do_malias_desc(), do_malias_list_all(), do_malias_remove(), do_malias_send(), fwdlist_get(), get_malias(), getboolexp1(), initialize_objects(), log_name(), main(), CGuests::MakeGuestChar(), OutOfMemory(), process_preload(), SendChannelMessage(), set_player_folder(), shovechars(), shutdownsock(), sighandler(), and CGuests::WipeAttrs().

#define Going (  )     ((Flags(x) & GOING) != 0)

Definition at line 277 of file flags.h.

Referenced by can_set_home(), check_contents_chains(), check_dead_refs(), check_events(), check_floating(), check_loc_contents(), check_loc_exits(), check_pennies(), count_quota(), divest_object(), do_comwho(), do_destroy(), do_icmd(), do_leave(), do_parent(), empty_obj(), fh_going_bit(), FUNCTION(), get_stats(), higcheck(), hook_fail(), load_comsystem(), move_exit(), mux_exec(), process_cmdent(), process_command(), process_preload(), purge_comsystem(), purge_going(), search_perform(), and Task_RunQueueEntry().

#define GOING   0x00004000

Definition at line 37 of file flags.h.

Referenced by destroy_bad_obj(), destroy_obj(), initialize_objects(), and purge_going().

#define Good_dbref (  )     (((x) >= 0) && ((x) < mudstate.db_top))

Definition at line 245 of file flags.h.

Referenced by FUNCTION(), load_comsystem(), OBJTYP(), and parse_boolexp_L().

#define Good_obj (  )     (Good_dbref(x) && (Typeof(x) < TYPE_GARBAGE))

Definition at line 246 of file flags.h.

Referenced by a_Queue(), absolute_name(), add_player_name(), announce_connect(), announce_disconnect(), atr_match(), atr_pget_info(), atr_pget_str_LEN(), can_set_home(), check_contents_chains(), check_dead_refs(), check_loc_contents(), check_loc_exits(), check_misplaced_obj(), check_zone_handler(), CGuests::CleanUp(), CGuests::Create(), create_obj(), debug_examine(), decode_flags(), destroy_obj(), CGuests::DestroyGuestChar(), dflt_from_msg(), did_it(), divest_object(), do_chanlog(), do_chboot(), do_chopen(), do_clone(), do_comlast(), do_cut(), do_drop(), do_entrances(), do_examine(), do_get(), do_halt(), do_icmd(), do_leave(), do_link(), do_look(), do_mail_debug(), do_mail_stats(), do_malias_create(), do_moniker(), do_notify(), do_open(), do_page(), do_parent(), do_prog(), do_quitprog(), do_quota(), do_say(), do_set(), do_setattr(), do_sweep(), do_teleport(), do_teleport_single(), do_toad(), do_train(), do_verb(), do_wait(), dump_info(), dump_users(), empty_obj(), find_connected_name(), FUNCTION(), fwdlist_load(), fwdlist_rewrite(), get_obj_and_lock(), get_stats(), grep_handler(), handle_flaglists(), hasattr_handler(), higcheck(), hook_fail(), internalPlayerFind(), CGuests::ListAll(), load_channels(), locatable(), log_type_and_name(), look_atrs(), look_exits(), look_in(), lookup_player(), mail_to_list(), make_namelist(), make_numlist(), malias_cleanup1(), mark_place(), match_absolute(), match_carried_exit(), match_carried_exit_with_parents(), match_controlled_handler(), match_exit(), match_exit_internal(), match_exit_with_parents(), match_here(), match_master_exit(), match_me(), match_neighbor(), match_numeric(), match_player(), match_possessed(), match_possession(), match_zone_exit(), move_exit(), move_via_teleport(), nearby(), nearby_or_control(), notify_check(), open_exit(), parse_attrib_wild(), parse_linkable_room(), parse_msglist(), parse_thing_slash(), pcache_reload(), Pennies(), process_cmdent(), process_command(), process_sex(), process_sticky_dropto(), promote_match(), QueueMax(), report(), s_Pennies(), scan_zone(), search_setup(), SendChannelMessage(), set_attr_internal(), ShowPsLine(), CGuests::StartUp(), Task_RunQueueEntry(), unparse_object(), unparse_object_numonly(), where_is(), where_room(), and zonecmdtest().

#define Good_owner (  )     (Good_obj(x) && OwnsOthers(x))

Definition at line 247 of file flags.h.

Referenced by check_floating(), destroy_obj(), and do_destroy().

#define H_Fwdlist (  )     ((Flags2(x) & HAS_FWDLIST) != 0)

Definition at line 315 of file flags.h.

Referenced by do_entrances(), and process_preload().

#define H_Listen (  )     ((Flags2(x) & HAS_LISTEN) != 0)

Definition at line 316 of file flags.h.

Referenced by Hearer(), notify_check(), and sweep_check().

#define H_Startup (  )     ((Flags(x) & HAS_STARTUP) != 0)

Definition at line 314 of file flags.h.

#define HALT   0x00001000

Definition at line 35 of file flags.h.

Referenced by chown_all(), do_chown(), do_command(), do_toad(), link_exit(), and Task_RunQueueEntry().

#define Halted (  )     ((Flags(x) & HALT) != 0)

Definition at line 275 of file flags.h.

Referenced by atr_match(), notify_check(), process_command(), setup_que(), and Task_RunQueueEntry().

#define Has_contents (  )     ((object_types[Typeof(x)].flags & OF_CONTENTS) != 0)

Definition at line 233 of file flags.h.

Referenced by check_dead_refs(), do_examine(), do_link(), do_pemit_single(), do_sweep(), do_teleport_single(), FUNCTION(), match_possession(), parse_linkable_room(), and process_command().

#define HAS_DAILY   0x00020000

Definition at line 74 of file flags.h.

Referenced by atr_add_raw_LEN(), atr_clr(), and check_events().

#define Has_dropto (  )     ((object_types[Typeof(x)].flags & OF_DROPTO) != 0)

Definition at line 237 of file flags.h.

Referenced by FUNCTION(), process_dropped_dropto(), and process_sticky_dropto().

#define Has_exits (  )     ((object_types[Typeof(x)].flags & OF_EXITS) != 0)

Definition at line 234 of file flags.h.

Referenced by do_sweep(), FUNCTION(), look_exits(), match_carried_exit(), match_carried_exit_with_parents(), match_exit_internal(), match_master_exit(), match_zone_exit(), and room_list().

#define HAS_FWDLIST   0x00000080

Definition at line 64 of file flags.h.

Referenced by atr_add_raw_LEN(), and atr_clr().

#define Has_home (  )     ((object_types[Typeof(x)].flags & OF_HOME) != 0)

Definition at line 236 of file flags.h.

Referenced by FUNCTION().

#define HAS_LISTEN   0x00000040

Definition at line 63 of file flags.h.

Referenced by atr_add_raw_LEN(), and atr_clr().

#define Has_location (  )     ((object_types[Typeof(x)].flags & OF_LOCATION) != 0)

Definition at line 232 of file flags.h.

Referenced by check_contents_chains(), check_loc_contents(), did_it(), divest_object(), do_clone(), do_entrances(), do_get(), do_leave(), do_sweep(), do_teleport_single(), empty_obj(), FUNCTION(), log_name_and_loc(), match_exit(), match_exit_with_parents(), match_here(), match_neighbor(), notify_check(), process_command(), and where_room().

#define Has_power ( p,
 )     (check_access((p),powers_nametab[x].flag))

Definition at line 377 of file flags.h.

#define Has_siblings (  )     ((object_types[Typeof(x)].flags & OF_SIBLINGS) != 0)

Definition at line 235 of file flags.h.

Referenced by FUNCTION().

#define HAS_STARTUP   0x00400000

Definition at line 45 of file flags.h.

Referenced by atr_add_raw_LEN(), atr_clr(), and process_preload().

#define Haven (  )     ((Flags(x) & HAVEN) != 0)

Definition at line 272 of file flags.h.

Referenced by do_kill().

#define HAVEN   0x00000400

Definition at line 33 of file flags.h.

#define Head (  )     ((Flags2(x) & HEAD_FLAG) != 0)

Definition at line 253 of file flags.h.

Referenced by check_access(), and return_bit().

#define HEAD_FLAG   0x00000400

Definition at line 67 of file flags.h.

#define HEARTHRU   0x40000000

Definition at line 53 of file flags.h.

#define Hidden (  )     ((Flags(x) & DARK) != 0)

Definition at line 311 of file flags.h.

Referenced by announce_connect(), announce_disconnect(), do_channelwho(), do_comconnectraw_notify(), do_comdisconnectraw_notify(), do_comwho(), do_delcomchannel(), do_joinchannel(), do_leavechannel(), do_mail_list(), do_mail_read(), do_mail_review(), dump_info(), dump_users(), find_connected_name(), flag_description(), FUNCTION(), handle_flaglists(), has_flag(), lookup_player(), make_port_ulist(), make_ulist(), nearby(), page_check(), and sweep_check().

#define Hideout (  )     ((Flags2(x) & UNFINDABLE) != 0)

Definition at line 304 of file flags.h.

Referenced by dump_users().

#define Home_ok (  )     ((object_types[Typeof(x)].flags & OF_HOME) != 0)

Definition at line 238 of file flags.h.

#define Html (  )     ((Flags2(x) & HTML) != 0)

Definition at line 378 of file flags.h.

Referenced by did_it(), dump_users(), look_contents(), look_exits(), look_in(), notify_check(), process_leave_loc(), raw_notify_html(), show_a_desc(), and show_vrml_url().

#define HTML   0x04000000

Definition at line 79 of file flags.h.

#define Immortal (  ) 

Value:

((Flags(x) & IMMORTAL) || \
                            ((Flags(Owner(x)) & IMMORTAL) && Inherits(x)))

Definition at line 284 of file flags.h.

Referenced by check_access(), and return_bit().

#define IMMORTAL   0x00200000

Definition at line 44 of file flags.h.

Referenced by do_clone().

#define INHERIT   0x02000000

Definition at line 48 of file flags.h.

Referenced by chown_all(), do_chown(), do_chzone(), do_clone(), and link_exit().

#define Inherits (  ) 

Value:

(((Flags(x) & INHERIT) != 0) || \
                            ((Flags(Owner(x)) & INHERIT) != 0) || \
                            ((x) == Owner(x)))

Definition at line 288 of file flags.h.

Referenced by create_obj(), do_clone(), fh_inherit(), and FUNCTION().

#define isExit (  )     (Typeof(x) == TYPE_EXIT)

Definition at line 241 of file flags.h.

Referenced by can_see(), check_exit_chains(), check_loc_contents(), check_loc_exits(), check_pennies(), do_examine(), do_give(), do_name(), do_teleport_single(), empty_obj(), FUNCTION(), handle_ears(), move_via_teleport(), and sweep_check().

#define isGarbage (  )     (Typeof(x) == TYPE_GARBAGE)

Definition at line 243 of file flags.h.

Referenced by do_chown(), do_teleport_single(), empty_obj(), give_thing(), and load_comsystem().

#define isPlayer (  )     (Typeof(x) == TYPE_PLAYER)

Definition at line 239 of file flags.h.

Referenced by add_player_name(), CallBack_HaltQueue(), CallBack_NotifySemaphoreDrainOrAll(), CallBack_NotifySemaphoreFirstOrQuiet(), can_see(), check_dead_refs(), check_pennies(), check_zone_handler(), chown_all(), CGuests::CleanUp(), could_doit(), CGuests::Create(), db_read(), do_alias(), do_boot(), do_channelwho(), do_chown(), do_chownall(), do_chzone(), do_clone(), do_comwho(), do_destroy(), do_fixdb(), do_halt(), do_icmd(), do_kill(), do_mail(), do_mail_debug(), do_mail_stats(), do_malias_add(), do_malias_create(), do_malias_send(), do_name(), do_page(), do_pemit_single(), do_poor(), do_prog(), do_ps(), do_quitprog(), do_quota(), do_report(), do_toad(), dump_mail(), exam_wildattrs(), fh_dark_bit(), fh_hear_bit(), fh_player_bit(), fh_privileged(), fh_restrict_player(), flag_description(), FUNCTION(), give_money(), give_thing(), handle_flaglists(), has_flag(), internalPlayerFind(), load_comsystem(), load_player_names(), load_restart_db(), lookup_player(), mail_to_list(), make_namelist(), match_player(), move_object(), notify_check(), process_command(), process_sex(), purge_comsystem(), send_mail(), CGuests::StartUp(), sweep_check(), test_join_access(), test_receive_access(), test_transmit_access(), and wait_que().

#define isRoom (  )     (Typeof(x) == TYPE_ROOM)

Definition at line 240 of file flags.h.

Referenced by check_floating(), check_pennies(), count_quota(), do_chzone(), do_get(), do_icmd(), do_link(), do_look(), do_pemit_single(), do_say(), do_teleport_single(), FUNCTION(), look_in(), move_via_teleport(), process_command(), show_a_desc(), show_desc(), where_room(), and zonecmdtest().

#define isThing (  )     (Typeof(x) == TYPE_THING)

Definition at line 242 of file flags.h.

Referenced by check_pennies(), do_chown(), do_chzone(), do_destroy(), do_icmd(), do_kill(), FUNCTION(), give_money(), give_thing(), and zonecmdtest().

#define Jump_ok (  )     (((Flags(x) & JUMP_OK) != 0) && Has_contents(x))

Definition at line 269 of file flags.h.

Referenced by do_teleport_single().

#define JUMP_OK   0x00000080

Definition at line 30 of file flags.h.

Referenced by unparse_object().

#define KeepAlive (  )     ((Flags2(x) & CKEEPALIVE) != 0)

Definition at line 260 of file flags.h.

Referenced by check_idle().

#define Key (  )     ((Flags2(x) & KEY) != 0)

Definition at line 299 of file flags.h.

Referenced by could_doit(), and divest_object().

#define KEY   0x00000001

Definition at line 57 of file flags.h.

#define Light (  )     ((Flags2(x) & LIGHT) != 0)

Definition at line 306 of file flags.h.

Referenced by can_see(), exit_displayable(), and exit_visible().

#define LIGHT   0x00000020

Definition at line 62 of file flags.h.

#define Link_exit ( p,
 ) 

Value:

((Typeof(x) == TYPE_EXIT) && \
                            ((Location(x) == NOTHING) || Controls(p,x)))

Definition at line 368 of file flags.h.

Referenced by do_examine().

#define Link_ok (  )     (((Flags(x) & LINK_OK) != 0) && Has_contents(x))

Definition at line 263 of file flags.h.

Referenced by do_link(), do_notify(), do_wait(), fwdlist_load(), and link_exit().

#define LINK_OK   0x00000020

Definition at line 28 of file flags.h.

Referenced by unparse_object().

#define Linkable ( p,
 ) 

Value:

(Good_obj(x) && Has_contents(x) && \
                            (((Flags(x) & LINK_OK) != 0) || Controls(p,x)))

Definition at line 370 of file flags.h.

Referenced by do_examine(), and parse_linkable_room().

#define Mark (  ) 

Value:

(mudstate.markbits->chunk[(x)>>3] |= \
                            mudconf.markdata[(x)&7])

Definition at line 358 of file flags.h.

Referenced by check_loc_contents(), check_loc_exits(), mark_place(), and search_mark().

#define MARK_0   0x00400000

Definition at line 104 of file flags.h.

#define MARK_1   0x00800000

Definition at line 105 of file flags.h.

#define MARK_2   0x01000000

Definition at line 106 of file flags.h.

#define MARK_3   0x02000000

Definition at line 107 of file flags.h.

#define MARK_4   0x04000000

Definition at line 108 of file flags.h.

#define MARK_5   0x08000000

Definition at line 109 of file flags.h.

#define MARK_6   0x10000000

Definition at line 110 of file flags.h.

#define MARK_7   0x20000000

Definition at line 111 of file flags.h.

#define MARK_8   0x40000000

Definition at line 112 of file flags.h.

#define MARK_9   0x80000000

Definition at line 113 of file flags.h.

#define Mark_all (  ) 

Value:

{for ((i)=0; (i)<((mudstate.db_top+7)>>3); (i)++) \
                            mudstate.markbits->chunk[i]=0xFFU;}

Definition at line 364 of file flags.h.

Referenced by do_markall().

#define Marked (  ) 

Value:

((mudstate.markbits->chunk[(x)>>3] & \
                            mudconf.markdata[(x)&7]) ? true : false)

Definition at line 362 of file flags.h.

Referenced by check_contents_chains(), check_exit_chains(), check_floating(), check_loc_contents(), check_loc_exits(), check_misplaced_obj(), do_apply_marked(), mark_place(), and search_mark().

#define Monitor (  )     ((Flags(x) & MONITOR) != 0)

Definition at line 278 of file flags.h.

Referenced by Hearer(), notify_check(), and sweep_check().

#define MONITOR   0x00008000

Definition at line 38 of file flags.h.

Referenced by announce_connect(), announce_disconnect(), and fh_hear_bit().

#define Myopic (  )     ((Flags(x) & MYOPIC) != 0)

Definition at line 279 of file flags.h.

#define MYOPIC   0x00010000

Definition at line 39 of file flags.h.

#define MyopicExam ( p,
 ) 

Value:

(((Flags(x) & VISUAL) != 0) || \
                            (!Myopic(p) && (See_All(p) || \
                            (Owner(p) == Owner(x)) || \
                            (check_zone(p,x)))))

Definition at line 346 of file flags.h.

Referenced by can_see(), and unparse_object().

#define No_Command (  )     ((Flags2(x) & NO_COMMAND) != 0)

Definition at line 258 of file flags.h.

Referenced by atr_match(), list_check(), and process_command().

#define NO_COMMAND   0x00002000

Definition at line 70 of file flags.h.

#define NoAccents (  )     ((Flags2(x) & NOACCENTS) != 0)

Definition at line 257 of file flags.h.

Referenced by queue_string().

#define NOACCENTS   0x20000000

Definition at line 82 of file flags.h.

#define NoBleed (  )     ((Flags2(x) & NOBLEED) != 0)

Definition at line 259 of file flags.h.

Referenced by queue_string().

#define NOBLEED   0x00008000

Definition at line 72 of file flags.h.

#define Nospoof (  )     ((Flags(x) & NOSPOOF) != 0)

Definition at line 291 of file flags.h.

Referenced by notify_check().

#define NOSPOOF   0x04000000

Definition at line 49 of file flags.h.

#define NOTYPE   0x7

Definition at line 22 of file flags.h.

Referenced by convert_flags(), do_chopen(), do_chzone(), do_clone(), do_entrances(), do_examine(), do_fixdb(), do_link(), do_lock(), do_look(), do_mail_debug(), do_mail_stats(), do_notify(), do_parent(), do_search(), do_setattr(), do_teleport(), do_teleport_single(), do_use(), do_verb(), do_wait(), FUNCTION(), match_controlled_handler(), match_possessed(), match_thing(), match_thing_quiet(), parse_attrib_wild(), parse_linkable_room(), parse_thing_slash(), promote_match(), search_perform(), and search_setup().

#define OF_CONTENTS   0x0001

Definition at line 150 of file flags.h.

#define OF_DROPTO   0x0010

Definition at line 154 of file flags.h.

#define OF_EXITS   0x0004

Definition at line 152 of file flags.h.

#define OF_HOME   0x0008

Definition at line 153 of file flags.h.

#define OF_LOCATION   0x0002

Definition at line 151 of file flags.h.

#define OF_OWNER   0x0020

Definition at line 155 of file flags.h.

#define OF_SIBLINGS   0x0040

Definition at line 156 of file flags.h.

#define Opaque (  )     ((Flags(x) & TM_OPAQUE) != 0)

Definition at line 286 of file flags.h.

Referenced by do_examine(), do_look(), and match_possessed().

#define Open_ok (  )     (((Flags2(x) & OPEN_OK) != 0) && Has_exits(x))

Definition at line 264 of file flags.h.

Referenced by open_exit().

#define OPEN_OK   0x00080000

Definition at line 76 of file flags.h.

#define OwnsOthers (  )     ((object_types[Typeof(x)].flags & OF_OWNER) != 0)

Definition at line 231 of file flags.h.

Referenced by a_Queue(), check_dead_refs(), pcache_reload(), Pennies(), QueueMax(), and s_Pennies().

#define Parent_ok (  )     ((Flags2(x) & PARENT_OK) != 0)

Definition at line 305 of file flags.h.

Referenced by do_clone().

#define PARENT_OK   0x00000010

Definition at line 61 of file flags.h.

#define Parentable ( p,
 ) 

Value:

(Controls(p,x) || \
                            (Parent_ok(x) && could_doit(p,x,A_LPARENT)))

Definition at line 338 of file flags.h.

Referenced by do_parent().

#define Player_haven (  )     ((Flags(Owner(x)) & HAVEN) != 0)

Definition at line 273 of file flags.h.

Referenced by check_access().

#define PLAYER_MAILS   0x02000000

Definition at line 78 of file flags.h.

Referenced by do_edit_msg(), do_expmail_abort(), do_expmail_start(), do_expmail_stop(), do_mail_cc(), do_mail_fwd(), do_mail_proof(), do_mail_quick(), do_mail_reply(), do_postpend(), and do_prepend().

#define Puppet (  )     ((Flags(x) & PUPPET) != 0)

Definition at line 280 of file flags.h.

Referenced by can_see(), Hearer(), notify_check(), and sweep_check().

#define PUPPET   0x00020000

Definition at line 40 of file flags.h.

#define Quiet (  )     ((Flags(x) & QUIET) != 0)

Definition at line 274 of file flags.h.

Referenced by check_dead_refs(), destroy_obj(), do_admin(), do_alias(), do_apply_marked(), do_attribute(), do_chown(), do_chownall(), do_clone(), do_create(), do_dbck(), do_destroy(), do_doing(), do_drop(), do_edit(), do_fixdb(), do_forwardlist(), do_function(), do_get(), do_global(), do_halt(), do_kill(), do_link(), do_lock(), do_markall(), do_moniker(), do_motd(), do_mvattr(), do_name(), do_notify(), do_parent(), do_queue(), do_set(), do_teleport_single(), do_trigger(), do_unlink(), do_unlock(), do_wipe(), fcache_load(), flag_set(), helpindex_load(), link_exit(), power_set(), and set_attr_internal().

#define QUIET   0x00000800

Definition at line 34 of file flags.h.

#define Robot (  )     (isPlayer(x) && ((Flags(x) & ROBOT) != 0))

Definition at line 230 of file flags.h.

Referenced by check_access(), destroy_obj(), and sp_ok().

#define ROBOT   0x08000000

Definition at line 50 of file flags.h.

Referenced by cf_init().

#define Royalty (  ) 

Value:

((Flags(x) & ROYALTY) || \
                            ((Flags(Owner(x)) & ROYALTY) && Inherits(x)))

Definition at line 250 of file flags.h.

Referenced by return_bit().

#define ROYALTY   0x20000000

Definition at line 52 of file flags.h.

Referenced by do_chzone().

#define s_Connected (  )     s_Flags((x), FLAG_WORD2, Flags2(x) | CONNECTED)

Definition at line 320 of file flags.h.

Referenced by announce_connect(), and load_restart_db().

#define s_Going (  )     s_Flags((x), FLAG_WORD1, Flags(x) | GOING)

Definition at line 319 of file flags.h.

Referenced by check_dead_refs(), and do_destroy().

#define s_Halted (  )     s_Flags((x), FLAG_WORD1, Flags(x) | HALT)

Definition at line 318 of file flags.h.

Referenced by check_dead_refs(), do_clone(), and setup_que().

#define s_Html (  )     s_Flags((x), FLAG_WORD2, Flags2(x) | HTML)

Definition at line 379 of file flags.h.

Referenced by announce_connect(), and logged_out1().

#define Safe ( x,
 ) 

Value:

(OwnsOthers(x) || (Flags(x) & SAFE) || \
                            (mudconf.safe_unowned && (Owner(x) != Owner(p))))

Definition at line 292 of file flags.h.

Referenced by do_destroy(), and CHashFile::Insert().

#define SAFE   0x10000000

Definition at line 51 of file flags.h.

#define See_attr ( p,
x,
 )     (!((a)->flags & AF_IS_LOCK) && bCanReadAttr(p,x,a,false))

Definition at line 372 of file flags.h.

Referenced by atr_has_flag(), check_attr(), default_handler(), do_addcommand(), do_chown(), do_delcommand(), do_function(), do_mvattr(), do_prog(), do_set(), find_wild_attrs(), FUNCTION(), list_attrtable(), and parse_and_get_attrib().

#define See_attr_explicit ( p,
x,
a,
o,
 ) 

Value:

(!((a)->flags & (AF_INTERNAL|AF_IS_LOCK)) && \
                            (((f) & AF_VISUAL) || (Owner(p) == (o)) && \
                            !((a)->flags & (AF_DARK|AF_MDARK))))

Definition at line 373 of file flags.h.

#define SEETHRU   0x00000008

Definition at line 26 of file flags.h.

#define SiteMon (  )     ((Flags3(x) & SITEMON) != 0)

Definition at line 322 of file flags.h.

Referenced by dump_users(), and SiteMonSend().

#define SITEMON   0x00000400

Definition at line 102 of file flags.h.

#define Slave (  )     ((Flags2(Owner(x)) & SLAVE) != 0)

Definition at line 310 of file flags.h.

Referenced by check_access(), and process_command().

#define SLAVE   0x80000000

Definition at line 84 of file flags.h.

#define Staff (  )     (Wizard(x) || Royalty(x) || ((Flags2(x) & STAFF) != 0))

Definition at line 249 of file flags.h.

Referenced by check_access(), convert_flags(), decode_flags(), do_comwho_line(), fh_staff(), flag_description(), FUNCTION(), has_flag(), and return_bit().

#define STAFF   0x00010000

Definition at line 73 of file flags.h.

#define Sticky (  )     ((Flags(x) & STICKY) != 0)

Definition at line 270 of file flags.h.

Referenced by process_dropped_dropto(), process_sticky_dropto(), and send_dropto().

#define STICKY   0x00000100

Definition at line 31 of file flags.h.

#define Suspect (  )     ((Flags2(Owner(x)) & SUSPECT) != 0)

Definition at line 307 of file flags.h.

Referenced by announce_connect(), announce_disconnect(), check_access(), do_fixdb(), do_kill(), do_name(), dump_users(), and process_command().

#define SUSPECT   0x10000000

Definition at line 81 of file flags.h.

#define Terse (  )     ((Flags(x) & TERSE) != 0)

Definition at line 295 of file flags.h.

Referenced by do_look(), look_in(), look_simple(), move_via_exit(), process_enter_loc(), process_leave_loc(), and show_desc().

#define TERSE   0x80000000

Definition at line 54 of file flags.h.

#define TM_OPAQUE   0x00800000

Definition at line 46 of file flags.h.

#define Trace (  )     ((Flags(x) & TRACE) != 0)

Definition at line 276 of file flags.h.

Referenced by mux_exec().

#define TRACE   0x00002000

Definition at line 36 of file flags.h.

#define Transparent (  )     ((Flags(x) & SEETHRU) != 0)

Definition at line 262 of file flags.h.

Referenced by do_look(), and look_exits().

#define TYPE_EXIT   0x2

Definition at line 18 of file flags.h.

Referenced by check_dead_refs(), chown_all(), count_quota(), create_obj(), destroy_obj(), do_chown(), do_clone(), do_decomp(), do_destroy(), do_drop(), do_entrances(), do_examine(), do_find(), do_get(), do_link(), do_look(), do_move(), do_search(), do_unlink(), FUNCTION(), get_stats(), list_df_flags(), move_exit(), OBJTYP(), open_exit(), process_command(), purge_going(), search_setup(), and where_is().

#define TYPE_GARBAGE   0x5

Definition at line 21 of file flags.h.

Referenced by check_dead_refs(), destroy_bad_obj(), destroy_obj(), do_link(), fh_going_bit(), initialize_objects(), OBJTYP(), and purge_going().

#define TYPE_MASK   0x7

Definition at line 23 of file flags.h.

Referenced by decode_flags().

#define TYPE_PLAYER   0x3

Definition at line 19 of file flags.h.

Referenced by can_set_home(), check_dead_refs(), chown_all(), count_quota(), CGuests::Create(), create_obj(), create_player(), decode_flags(), destroy_obj(), do_boot(), do_chown(), do_chownall(), do_decomp(), do_destroy(), do_drop(), do_enter(), do_entrances(), do_examine(), do_get(), do_give(), do_kill(), do_link(), do_look(), do_pemit_single(), do_search(), do_toad(), FUNCTION(), get_stats(), list_df_flags(), move_exit(), notify_check(), OBJTYP(), purge_going(), search_setup(), unparse_boolexp1(), and where_is().

#define TYPE_ROOM   0x0

Definition at line 16 of file flags.h.

Referenced by announce_connect(), announce_disconnect(), can_set_home(), check_dead_refs(), chown_all(), count_quota(), create_obj(), db_make_minimal(), destroy_obj(), do_chown(), do_clone(), do_decomp(), do_destroy(), do_dig(), do_entrances(), do_examine(), do_link(), do_look(), do_search(), do_unlink(), FUNCTION(), get_stats(), list_df_flags(), move_exit(), notify_check(), OBJTYP(), purge_going(), and search_setup().

#define TYPE_THING   0x1

Definition at line 17 of file flags.h.

Referenced by announce_connect(), announce_disconnect(), can_set_home(), check_dead_refs(), chown_all(), count_quota(), create_obj(), destroy_obj(), do_chown(), do_clone(), do_create(), do_decomp(), do_destroy(), do_drop(), do_enter(), do_entrances(), do_examine(), do_get(), do_link(), do_look(), do_search(), do_toad(), FUNCTION(), get_stats(), give_thing(), list_df_flags(), move_exit(), notify_check(), OBJTYP(), parse_boolexp_L(), purge_going(), search_setup(), unparse_boolexp1(), and where_is().

#define Typeof (  )     (Flags(x) & TYPE_MASK)

Definition at line 228 of file flags.h.

Referenced by announce_connect(), announce_disconnect(), can_set_home(), check_dead_refs(), chown_all(), count_quota(), destroy_obj(), do_chown(), do_clone(), do_decomp(), do_destroy(), do_drop(), do_enter(), do_entrances(), do_examine(), do_find(), do_get(), do_link(), do_look(), do_parent(), do_search(), do_unlink(), fh_going_bit(), flag_description(), FUNCTION(), get_stats(), handle_flaglists(), move_exit(), notify_check(), OBJTYP(), promote_match(), purge_going(), scan_zone(), search_perform(), search_setup(), unparse_boolexp1(), and where_is().

#define UNFINDABLE   0x00000008

Definition at line 60 of file flags.h.

#define Uninspected (  )     ((Flags2(x) & UNINSPECTED) != 0)

Definition at line 255 of file flags.h.

Referenced by check_access(), and return_bit().

#define UNINSPECTED   0x00001000

Definition at line 69 of file flags.h.

#define Unmark (  ) 

Value:

(mudstate.markbits->chunk[(x)>>3] &= \
                            ~mudconf.markdata[(x)&7])

Definition at line 360 of file flags.h.

Referenced by check_misplaced_obj(), create_obj(), and search_mark().

#define Unmark_all (  ) 

Value:

{for ((i)=0; (i)<((mudstate.db_top+7)>>3); (i)++) \
                            mudstate.markbits->chunk[i]=0x0;}

Definition at line 366 of file flags.h.

Referenced by check_contents_chains(), check_exit_chains(), check_floating(), and do_markall().

#define Vacation (  )     ((Flags2(x) & VACATION) != 0)

Definition at line 298 of file flags.h.

#define VACATION   0x01000000

Definition at line 77 of file flags.h.

Referenced by announce_connect().

#define Verbose (  )     ((Flags(x) & VERBOSE) != 0)

Definition at line 287 of file flags.h.

Referenced by process_command().

#define VERBOSE   0x01000000

Definition at line 47 of file flags.h.

#define VISUAL   0x00100000

Definition at line 43 of file flags.h.

#define Wizard (  ) 

Value:

((Flags(x) & WIZARD) || \
                            ((Flags(Owner(x)) & WIZARD) && Inherits(x)))

Definition at line 265 of file flags.h.

Referenced by announce_connect(), atr_cpy(), bCanLockAttr(), bCanSetAttr(), can_destroy_player(), canpayfees(), check_access(), check_connect(), check_dead_refs(), check_loc_contents(), convert_flags(), decode_flags(), CGuests::DestroyGuestChar(), display_flagtab(), display_powertab(), do_chown(), do_chzone(), do_drop(), do_expmail_start(), do_kill(), do_mail_debug(), do_mail_fwd(), do_mail_quick(), do_mail_reply(), do_mail_stats(), do_motd(), do_pemit_single(), do_processcom(), do_ps(), do_use(), fh_dark_bit(), fh_restrict_player(), fh_wiz(), flag_description(), FUNCTION(), give_money(), giveto(), has_flag(), has_power(), list_options(), locatable(), mail_check(), mkattr(), move_exit(), move_via_exit(), page_check(), payfor(), ph_wiz(), powers_list(), process_enter_loc(), process_leave_loc(), QueueMax(), return_bit(), send_mail(), sp_ok(), and wall_broadcast().

#define WIZARD   0x00000010

Definition at line 27 of file flags.h.

Referenced by announce_connect(), announce_disconnect(), check_idle(), CGuests::Create(), db_make_minimal(), decode_flags(), do_chzone(), do_clone(), do_fixdb(), do_kill(), do_name(), fh_any(), link_exit(), and CGuests::MakeGuestChar().

#define WizRoy (  )     (Royalty(x) || Wizard(x))

Definition at line 252 of file flags.h.

Referenced by bCanReadAttr(), check_access(), check_connect(), convert_flags(), decode_flags(), do_move(), fh_wizroy(), flag_description(), FUNCTION(), has_flag(), process_command(), scan_zone(), and wall_broadcast().


Typedef Documentation

typedef struct flag_bit_entry FLAGBITENT

typedef struct flag_name_entry FLAGNAMEENT

typedef struct flagset FLAGSET

typedef struct object_entry OBJENT


Function Documentation

bool convert_flags ( dbref  ,
char *  ,
FLAGSET ,
FLAG  
)

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  ,
FLAGSET  
)

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  ,
dbref  ,
char *   
)

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   ) 

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 }

char* flag_description ( dbref  ,
dbref   
)

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 }

void flag_set ( dbref  ,
dbref  ,
char *  ,
int   
)

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  ,
dbref  ,
char *   
)

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  ,
dbref  ,
bool   
)

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   ) 

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

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]

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