FB3 Changes

I'm still in the process of hypertexting this document. Until I'm done, here's the flat ASCII version. -- Telzey

TinyMUCK 2.2fb+ CHANGES File
============================

2.2fb3.7
Fixed:
  Bug with player input being blocked after a program aborts with abort_loop()
  Crashing bug with using 'view' with an invalid object in the editor.
  Crashing bug in controls() while checking control of an exit.
  Crashing bug in @entrances.
  Crashing bug with trying to moveto an object to #-3 (HOME).
  Bug with @dig not setting personal $regnames when parent is specified.
  Bug with the compiler not catching consecutive ELSE primitives in some
    circumstances.
  Bug with the command muf variable getting a null string when command
    line args are not used.

Changes:
  @find and @owned can now let you search AGAINST object types.  ie:
    search for all dark non-exits with @find *=d!e

  @entrances now lets you give a flagstring argument similar to what @find
    and @owned let you specify.  You could list all players who are homed
    to the room you are in with @entrances here=p

  QUEUE now returns the process ID number for the newly queued event.
    If the process queue is full, then the returned value will be a 0.

  There is now a maximum of 256 processes allowed on the time queue.
    Once the queue is full, no more processes can be added to it until
    some processes die.

  Expanded the info that @ps tells you to also list how long a process
    has been running, and how many instructions it's executed so far.
    Also changed the way process ID's are handled so that a process
    will keep the same unique ID as it runs.

  If, while doing a pronoun_sub, the source string contains a %X type
    code, (ie: %n, %p, %a, etc.) it first checks on the player to see if
    they have an overriding property set, then it checks down the environ-
    ment tree to see if there is an overriding default set, and THEN it
    tries the built in defaults.  This lets you do things like use %v as
    a movement verb in @osucc messages, and have a default set for it.
    Ie: '@set #0=%v:walks' so that the default could be something like
    "Foxen walks north." But a player could set their own overrides like
    '@set me=%v:pads' to get something like:  "Foxen pads north."

  When timestamps are updated on a room, it now updates timestamps in all
    the rooms down the environment from it.

  The way loops are implemented has been expanded and loosened up a bit:
    The BEGIN statement marks the beginning of a loop.
    Either the UNTIL or REPEAT statement marks the end of the loop.
      REPEAT will do an unconditional jump to the statement after the BEGIN
        statement.
      UNTIL checks to see if the value on the stack is false.  If it is, it
        jumps execution to the statement after the BEGIN statement, otherwise,
        it falls through on execution to the statement after the UNTIL.
    Within a loop, even within IF-ELSE-THEN structures within the loop
      structure, you can place WHILE, CONTINUE, or BREAK statements.  There
      is no limit as to how many, or in what combinations these instructions
      are used.
      A WHILE statement checks to see if the value on the stack is false.
        If it is, execution jumps to the first statement after the end of
        the loop.  If the value was true, execution falls through to the
        statement after the WHILE.
      The CONTINUE statement forces execution to jump to the beginning of
        the loop, after the BEGIN.
      The BREAK statement forces execution to jump to the end of the loop,
        at the statement after the REPEAT or UNTIL, effectively exiting the
        loop.
    Note: You can nest loops complexly, but WHILE, BREAK, and CONTINUE
      statements only refer to the innermost loop structure.
    Example of a complex loop structure:
      101 begin                       (BEGIN the outer loop)
        dup while 1 -                 (This WHILE, ...)
        dup not if break then         (this BREAK, and..)
        dup 2 % not if continue then  (this CONTINUE refer to the outer loop)
        dup 10 % not if
          15 begin                    (BEGIN inner loop)
            dup while 1 -             (This WHILE, and.. )
            dup 5 % not if break then (... this BREAK, refer to inner loop)
          repeat                      (This REPEAT statement ends inner loop.)
        then
        dup 7 % not if continue then  (This CONTINUE, and...)
        dup 3 % not if dup 9 % while then (this WHILE refer to the outer loop)
        dup intostr me @ swap notify
      dup 1 = until pop               (This UNTIL ends the outer loop)


Added:
  @usage will give stats about current resource usage for the MUCK.

Primitives added:
  BREAK      ( -- )    Breaks out of the innermost loop.
  CONTINUE   ( -- )    Jumps execution to the beginning of the innremost loop.
  KILL       (i -- i)  Attempts to kill the given process number.  Returns 1
                        if the process existed, and 0 if it didn't.
  STRIP      (s -- s)  Strips leading and traling spaces from a string.




2.2fb3.6
Fixed:
  A BAD Bug introduced in fb3.5 that lost all @messages on loading in from
    Lachesis or WhiteFire db dump formats.

  Problem with requiring Listener progs to be Wizbit.

  Problem with some systems and strdup.  Put strdup into stringutils.c too.


Changed:
  Connections to the server, where they don't log into a character within
    five minutes, get disconnected, to prevent tying up ports.

  When a player connects or disconnects, the ":has connected/disconnected."
    message now appears *before* the connect/disconnect actions are triggered.

  An exit is now controlled by it's owner, the owner of it's source, and the
    owner of the objects it is linked to.

  @props and ~props are only settable by wizbit programs now, and @props are
    only readable to wizbit programs.

  The NEXTPROP primitive will now skip over property names that the program
    and user would not have permissions to read.  Wizbit programs can see all
    of the properties on an object.  Otherwise, nextprop will skip over the
    props that are not readable by the uid the program is running under.

  Commands like @desc, @lock, @succ, @osucc, etc. now will work at a distance
    for the owner of the object, if the object is referred to by dbref.  This
    facilitates builder programs.

  @dig, @action, @open, and @create can now take a third parameter in the form:
      @dig <roomname>=<parent>=<registername>
      @action <actionname>=<source>=<registername>
      @open <exitname>=<destination>=<registername>
      @create <objectname>=<cost>=<registername>
    where <registername> is an optional parameter that is the name that you
    want it to register the object as.  It registers the object in the
    creating player's personal registration _reg/ propdir.  For example:
    if Joe_blow types '@dig Bedroom=$myenv=mybedroom' then it will create
    the room "Bedroom" and set it's parent to the room referred to by $myenv
    then registers it on the player as $mybedroom by setting the _reg/mybedroom
    property to the dbref of the room object created.  If the <registername>
    parameter is excluded, then the object isn't registered.  If you want
    to, for example, @create an object, but not set it's value, but you DO
    want to register it, then you just exclude That parameter, but remember
    to put in both = signs.  ie:  @create Smiley Face Sticker==smiles

  help, man, and news now can all have subtopics.  If you use one without
    an argument, then it lists a default file for the command.  The default
    files are 'data/man.txt', 'data/help.txt', and 'data/news.txt'.  If a
    topic is given, it lists the file by that name in the appropriate
    command's subdirectory, if it exists.  help uses the 'data/help' sub-
    directory, man uses 'data/man', and news now uses 'data/news'.
    As an example, if someone typed 'help building', it would list out the
    'data/help/building' file out to them.

  Rewrote the Listeners code for doing notify_exclude, and to clean it up.
    Now, when a message is notify_except'ed or notify_exclud'ed to a room,
    and LISTENERS and LISTENERS_ENV are defined, then it will run ALL the
    programs referred to in all the _listen properties down the environment
    tree, instead of just the first down the env tree like before. Also,
    the MUF NOTIFY primitive was changed to run the _listen program on an
    object or player if a message is sent to them that way.

  Improved the matching in @kill.  Now you can @kill by a player's name, or
    a program's registered name.


Added:
  '@entrances <object>' will list all the objects in the db that are linked
    to the given object.  This means player and thing homes, room droptos,
    and exit destinations.

New Primitives:
  ENVPROPSTR (s d -- s d )  Takes a starting object dbref and a property name
                             and searches down the environment tree from that
                             object for a property with the given name.
                             If the property isn't found, it returns #-1 and
                             a null string.  If the property is found, it will
                             return the dbref of the object it was found on,
                             and the string value it contained.

  NOTIFY_EXCLUDE (d dn ... d1 n s -- )  Displays the message s to all the
                             players (or _listening objects), excluding the
                             n given players, in the given room.  Example:
                             #0 #1 #23 #7 3 "Hi!" notify_exclude
                             would send "Hi!" to everyone in room #0 except
                             for players (or objects) #1, #7, and #23.




2.2fb3.5b2
Fixed:
  Problem with @find and @owned not properly matching object types.
    Unfortunately, the fix means that you can't do finds against an object
    type.  (ie  !R)
  Problem with $define undefining properties with the names matching the
    definition of newly $defined macros
  Fixed problem with the UNPARSEOBJ primitive.
  Problem with not recognizing compiler directives.
  Stupid bug with printing the program owner's name on a MUF prog crash.
  Error with printing "XXX has disconnected." to wrong room when a program
    is run by a disconnect, and moved the player.



2.2fb3.5
Fixed:
  Fixed bug where $includes in a program compiled when CALLed by a program
    that an action is locked to, will not lose the command line args when
    running the program that the action is linked to.
  Fixed the problem that TIMEFMT had with preceeding '0's when it needed
    to output other preceeding character types for some subs.

Changed:
  @find now can take two arguments.  The first argument is an smatch expr-
    ession, and the second argument is a flag string expression.  The syntax
    is '@find <objectname>=<flags&type>'.  The object name argument is an
    smatch expression, meaning you could pass it something like:
      '{gen?*|cmd?*}*' And it it would match all items who's name starts with
    "gen" or "cmd" and have at least one character after that.  (see the
    description of the SMATCH primitive later in this document)  The flags
    string argument is rather different.  It is a string that consists of
    the letters you would see in the flags field after a dbref in an examine,
    and negations.  ie: "FW!D" would match programs that are set Wizard and
    NOT set Debug.  A wizard could find all the MUCKER players in the data-
    base who were not wizards simply with a '@find =P!WM'.  The '!' means
    that it will match an object if the next flag is *NOT* set. (so long
    as all the other flags match, also, of course)
    If programs have consistent naming schemes on your MUCK, you could do a
    '@find {gen-*|cmd-*}*=FWL' to find all Link_OK Wizard Programs in the
    database who's names start with "gen-" or "cmd-" as an example.
    NOTE:  @find doesn't work the same as it used to.  You need to give it
      wildcards on either side of the matching string in the new setup.
      For example, the OLD '@find foo' would be the same as the NEW
      '@find *foo*=!E'

  @owned now can take two arguments, similar to @find, but the first argument
    hasn't been altered in its usage.  The second argument is a flag string
    of the same type used in the new @find.  The syntax for the new @owned is
    '@owned <player>=<flags&type>'.  Example: to list all the link_ok prog-
    rams, not set debug, owned by player Foo, you would use: "@owned foo=FL!D"

  The matching routines no longer look for _progreg/xxxx, as I decided that
    this is too useful a mod to keep for programs alone.  It now looks for
    $registered names in _reg/ for a STRING that contains the dbref of the
    program to reference.  The string can simply be a number like "1234" or
    prepended by a # like "#1234".

  Moved @desc, @succ, @fail, @drop, @osucc, @ofail, and @odrop into properties
    in preparation for disk basing mods.

  Removed DESC, SUCC, FAIL, DROP, OSUCC, OFAIL, ODROP, SETDESC, SETSUCC,
    SETFAIL, SETDROP, SETOSUCC, SETOFAIL, and SETODROP and replaced them with
    $defines that would set/get the appropriate information in/from properties.
    For example, DESC is now translated to '"_/de" getpropstr' and SETDESC is
    translated to '"_/de" swap 0 addprop'.  One result of this is that if you
    tried to escape one of these command names with a backslash in a macro
    definition, it wouldn't work.  ie:  \SETDESC would get a compile error.

  When a MUF program crashes, now, it will tell the player who to tell about
    the crash. (The person who is the owner of the program)  If the owner of
    the program is the one running it when the program crashes, then it
    simply tells them that it crashed.  This is all in addition to the
    earlier improvements that tell you what line and program it crashed at.


Added:
  COMMAND variable, similar to ME, LOC, and TRIGGER, except that it contains
    a string.  The string contains the command the user typed that triggered
    the the program, without the command line arguments.  ie:  if there was
    an exit named "abracadabra;foo bar;frozzboz" that was linked to the
    program, and the user typed in "foo bar baz", then the program would run
    with "baz" on the stack, and "foo bar" in the global COMMAND variable.




2.2fb3.4
Fixed:
  Crashing bug with TIMESTAMPS primitive.
  Bug in PRONOUN_SUB primitive.

Added:
  Compiler directives for MUF:
    $define <defname> <definition> $enddef
      Basically the same as C's #define <defname> <definition>
    $undef <defname>
      About the same as C's #undef <defname>
    $echo <string>
      Echos the given string to the screen of the person compiling the program.
      Runs at compile-time.
    __version
      A pre$defined macro that contains the current server version.
      Currently "Muck2.2fb3.4"
    $ifdef <condition> <compile this if true> $else <compile if false> $endif
    $ifndef <condition> <compile this if true> $else <compile if false> $endif
      where <condition> is either a $defined name, or a test that consists of
      a $defined name, a comparator (=, <, or >) and a test value, all in one
      word without space.  The $else clause is optional.  Compiler directives
      are nestable also.  Some examples:
      $ifndef __version>Muck2.2fb3.5 $define envprop .envprop $enddef $endif
      $define ploc $ifdef proplocs .proploc $else $endif $enddef
    $include <dbref|progreg>
      Sets a bunch of $defines from the properties in the /_defs/ propdir.
      For example, if object #345 had the following properties:
        /_defs/desc: "_/de" getpropstr
        /_defs/setpropstr: dup if 0 addprop else pop remove_prop then
        /_defs/setpropval: dup if "" swap addprop else pop remove_prop then
        /_defs/setprop: dup int? if setpropval else setpropstr then
      then if a program contained '$include #345' in it, then all subsequent
      references to 'desc', 'setpropstr', 'setpropval', and 'setprop' would
      be expanded to the string values of their respective programs. ie:
      'desc' would be replaced throughout the program with '"_/de" getpropstr'

  You can now escape a token in MUF so that it will be interpreted literally.
    ie:  \.pmatch will try to compile '.pmatch' without expanding it as a
    macro.  This lets you make special things with $defines such as:
    $define addprop over over or if \addprop else pop pop remove_prop $enddef
    so that all the 'addprop's in the program will be expanded to the
    definition, but the 'addprop' in the definition will not try to expand
    recursively.  It will call the actual addprop.



2.2fb3.3
Changed:
  Made CONNOTIFY not require a wizbit.
  @prog was renamed to @program.  @prog still works as it is an abbreviation.

Fixed:
  Bug with unparsing locks to >4096 character strings.
  Bug with the PRONOUN_SUB part of dispatch() in interp.c
  Bug that allowed wizards to be @toaded if QUELLed.
  Bug where RMATCH would not match on the contents of TYPE_THING objects.
  Bug where RMATCH or MATCH in a program lock blew away command line args.

Primitives added:
  SMATCH      ( s s -- i )   Takes a string and a string pattern to check
                              against.  Returns true if the string fits
                              the pattern.  In the pattern string, a '?'
                              matches any single character, '*' matches
                              any number of characters. Word matching can
                              be done with '{word1|word2|etc}'.  If mult-
                              ible characters are in [], it will match a
                              single character that is in that set of
                              characters.  '[aeiou]' will match a single
                              character if it is a vowel, for example.
                              To search for one of these special chars,
                              put a \ in front of it to escape it.  It is
                              not case sensitive.  Example pattern:
                              "{Foxen|Lynx|Fiera} *t[iy]ckle*\?"  Will
                              match any string starting with 'Foxen',
                              'Lynx', or 'Fiera', that contains either
                              'tickle' or 'tyckle' and ends with a '?'.

  CONDESCR    ( i -- i )     Takes a connection number and returns the
                              descriptor number associated with it.



2.2fb3.2
Changed:
  @queue was renamed to @ps.
  @dequeue was renamed to @kill.

  "@set <obj>=:" will no longer delete properties and propdirs whose
  root property is an @prop or an ~prop.  It will delete all of the
  properties on an object That do not START with @ or ~.  (ie: it will
  NOT delete "/@combat/weapons/crossbow" but it WILL delete the prop
  "/combat/@weapons/crossbow")  This restriction applies only for non-
  wizards.  A wizard using "@set <obj>=:" will remove *ALL* of the
  properties from the object.

  Made ROOM?, PLAYER?, THING?, EXIT?, and PROGRAM? primitives return false
  if the object passed to it is invalid, instead of aborting interpreting.

Primitives added:
  TOUPPER    ( s -- s )  Takes a string and returns it with all the letters
                          in uppercase.

  TOLOWER    ( s -- s )  Takes a string and returns it with all the letters
                          in lowercase.

  SETLOCKSTR (d s -- i)  Tries to set the lock on the given object to the
                          lock expression given in the string.  If it was a
                          success, then it will return a 1, otherwise, if
                          the lock expression was bad, it returns a 0.  To
                          unlock an object, set its lock to a null string.

  GETLOCKSTR ( d -- s )  Returns the lock expression for the given object
                          in the form of a string.  Returns "*UNLOCKED*" if
                          the object doesn't have a lock set.

  UNPARSEOBJ ( d -- s )  Returns the name-and-flag string for an object.
                          For example: "One(#1PW)"



2.2fb3.1
Changed:
  Objects of type Thing can now contain either objects of type Program or
  Thing.  This means you can either use @tel or a MUF program using 'moveto'
  to put stuff in a container, or take it out.  You can @create a bag,
  for example, and keep your programs and nicknacks in it.  When you
  are checked against a lock either in MUF with 'locked?' or by
  triggering an action, it will look for items recursively within any
  containers you are carrying, and will check for properties in the
  same way.  You cannot make a loop of containers (ie, a container
  holding a container that holds the first) as it is prevented in both
  @tel and 'moveto'

  Made minor internal changes to the timequeue execution routines that
  fixed a bug that let a single running program get 10 timeslices before
  giving one to the players.  This will make multitasking programs about
  half as fast, but should make some stuff cleaner.



2.2fb3
Added:
  Objects are now timestamped with the times the objects were created,
  the time they were last modified, the time they were last used, and
  the number of times it has been used.  The lastused count and time are
  updated on login and logout for players, on looking at an exit, room,
  or thing, on running a program, on get'ting or drop'ping a thing,
  or when reading a name/desc/succ/osucc/fail/ofail/drop/odrop, or a
  property from a thing, room, or exit.
  Modified is updated when the @name/desc/succ/osucc/fail/ofail/drop/odrop
  or property are set to a new value on any object.
  Created is the set only when an object is @created, @actioned, @dig'ged
  @prog'ed or @pcreated, or if the similar functions are done in MUF.

Primitives:
      TIMESTAMPS ( d -- i i i i )   Takes the dbref of an object, and returns
                                     the four timestamp ints in the order of
                                     Created, Modified, Lastused, and Usecount
                                     where the three times are in systime
                                     notation.

Return to the TinyMUCK Page

Page created by Telzey, and maintained by Tugrik d'Itichi.
Comments/Questions/Flames to: FMPages@furry.com