/** Display information on an attribute from the table. * \verbatim * Top-level function for @attribute. * \endverbatim * \param player the enactor. * \param name the name of the attribute. */ void do_attribute_info(dbref player, char *name) { ATTR *ap; if (!name || !*name) { notify(player, T("Which attribute do you mean?")); return; } /* Is this attribute in the table? */ if (*name == '@') name++; ap = aname_hash_lookup(name); if (!ap) { notify(player, T("That attribute isn't in the attribute table")); return; } notify_format(player, "%9s: %s", T("Attribute"), AL_NAME(ap)); if (ap->flags & AF_RLIMIT) { notify_format(player, "%9s: %s", T("Limit"), display_attr_limit(ap)); } else if (ap->flags & AF_ENUM) { notify_format(player, "%9s: %s", T("Enum"), display_attr_limit(ap)); } notify_format(player, "%9s: %s", T("Flags"), privs_to_string(attr_privs_view, AL_FLAGS(ap))); notify_format(player, "%9s: %s", T("Creator"), unparse_dbref(AL_CREATOR(ap))); return; }
/** Attr things to be done after the config file is loaded but before * objects are restarted. */ void attr_init_postconfig(void) { ATTR *a; /* read_remote_desc affects AF_NEARBY flag on DESCRIBE attribute */ a = aname_hash_lookup("DESCRIBE"); if (a) { if (READ_REMOTE_DESC) a->flags &= ~AF_NEARBY; else a->flags |= AF_NEARBY; } if (USE_MUXCOMM) { a = aname_hash_lookup("CHANALIAS"); if (!a) { add_new_attr("CHANALIAS", AF_NOPROG); } } }
/** Attr things to be done after the config file is loaded but before * objects are restarted. */ void attr_init_postconfig(void) { ATTR *a; /* read_remote_desc affects AF_NEARBY flag on DESCRIBE attribute */ a = aname_hash_lookup("DESCRIBE"); if (READ_REMOTE_DESC) a->flags &= ~AF_NEARBY; else a->flags |= AF_NEARBY; }
/** Display information on an attribute from the table. * \verbatim * Top-level function for @attribute. * \endverbatim * \param player the enactor. * \param name the name of the attribute. */ void do_attribute_info(dbref player, char *name) { ATTR *ap; if (!name || !*name) { notify(player, T("Which attribute do you mean?")); return; } /* Is this attribute in the table? */ if (*name == '@') name++; ap = aname_hash_lookup(name); if (!ap) { notify(player, T("That attribute isn't in the attribute table")); return; } display_attr_info(player, ap); return; }