Basic Entities

Submitted by javelin on Sat, 2002-11-30 18:03

PennMUSH has 4 major types of entities that can be manipulated or accessed through mushcode:

  1. Objects: There are four function types of objects: players, things, exits, and rooms. A fifth type, garbage, is used to marked recycled objects, and can not be effectively manipulated in mushcode.
  2. Descriptors: Each connection to the MUSH server is represented by a number called a socket (or file) descriptor. A descriptor may not have a player dbref associated with it (if the connection is waiting at the connect screen). A player dbref may have multiple descriptors (if they're connected more than once).

    Information stored on the descriptor (and not the player object) includes: Pueblo and Hidden status; connection ip address, host, and time; output prefix and suffix. That's why these things can be different for different connections of multiple players. (the @doing message is also stored on the descriptor, but the @doing command currently changes the @doing on every descriptor of the player running it)

    PennMUSH commands that operate on descriptors rather than player objects are conventionally uppercased: LOGOUT, QUIT, WHO/DOING/SESSION/INFO, OUTPUTPREFIX, OUTPUTSUFFIX. These commands are handled outside of (and earlier than) the main command parser (which is why you can't @force someone to do them). @boot/port expects a descriptor argument. The pueblo() and hidden() functions takes a player argument, but returns information about the player's most recently active descriptor.

  3. Mail: The @mail system stores @mail in a separate database.
  4. Chat channels: The @chat system stores channels and their members in a separate database.