mux2.4/game/data/
mux2.4/src/tools/
TinyMUX 2.4:  CHANGES
Last Update:  October 2005

Major changes that may affect performance and require softcode tweaks:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 -- The units on the timeslice configuration option have changed from
    milliseconds to seconds.  But, seconds can be expressed as a
    fraction whereas milliseconds could only be expressed as an
    integer, so this change doesn't take any capability away.
 -- Control over WOD Realms, Memory-Based, and other build options
    have been pulled back into the ./configure script.  The README
    files refer to the new methods, and ./configure --help gives a list.
    Also, gmake is no longer necessary for *BSD flavors.
 -- The behavior of case() is closer to switch().  The patterns are now
    evaluated.  The #$ substitution is also made.


Feature Additions:
~~~~~~~~~~~~~~~~~
 -- Added support for multi-character delimiters across nearly all
    functions which accept input or output delimiters.  For example,
    'iter(1%r2%r3,itext(),%r,|)' produces '1|2|3'.
 -- Added 'reset_players' configuration option which resets the player
    connection record.
 -- Added 'user_attrib_per_hour' which limits the rate at which
    user-defined attribute names are created.
 -- Added 'mail_per_hour' which limits the rate at which @mail can be
    created.
 -- Add output delimiter to elements(), extract(), filter(),
    filterbool(), graball(), remove(), shuffle(), sortby(), and
    splice().
 -- Connection, disconnection, partial, and suspect emits now show the
    player's @moniker.
 -- Added lag_limit configuration option to control how long the
    server will service commands.  The execution of expensive commands
    is abbreviated, and the queue is drained, and the executor is
    @set HALTED.  lag_maximum continues to be the reporting threshold.
 -- On Win32, use higher-quality time from QueryPerformanceCounter()
    instead of GetSystemTimeAsFileTime().  As soon as the error from
    using QueryPerformanceCounter() drops below 5ms, the server
    switches to using it as a time source.  So, if you are doing any
    softcode profiling on Win32, you need to wait a few seconds after
    the server is started before beginning your tests.
 -- Updated PCRE from version 4.2 to version 4.5.
 -- Added BXOR() function.
 -- Added siteadmin @power to permit mortals to operate @shutdown and
    @restart.  The idea is that the site administrator will have access
    to the shell account, but may also need access to site-related
    facilaties within the game.
 -- Add FCOUNT() and FDEPTH() for softcode access to function invocation
    and nesting counters.
 -- Added POWERS() function to return a space-delimited list of powers.
    PennMUSH implement this first.
 -- Added some plumbing for SQL.  There is no way to make SQL queries,
    but @ps would show them if there were.  @halt and @kick would also
    interact with them.
 -- Added CHOOSE().  CHOOSE() is like PICKRAND() except that the
    distribution is weighted.  The idea was originally implemented by
    Catherine@Firan.  The code included here is based on a
    re-implementation of that in TM3.1 by Lydia.
 -- Added TEXTFILE() to allow easier softcode access to helpfile topics.
    Re-implemented from TM3.1 help topic.  Originally from PennMUSH.
 -- Added guests_channel_alias and public_channel_alias configuration
    options.
 -- Extended behavior of MID() to more easily cover the LEFT() and
    RIGHT() behaviors.
 -- Added optional second argument to RAND().
 -- Added patch surface for BTMUX.
 -- @teleport/list accepts a space-delimited list of objects to
    teleport.
 -- Added cemit().  Also, changed the permission control so that any
    object that controls the channel owner can use cemit()/@cemit.
 -- vadd() now allows addition of a vector by a scalar similiar to
    vmul().
 -- Remove the 20-argument limit from the vector functions.
 -- Added @mfail message. When @mail/lock rejects @mail, the @mfail is
    shown to the sender. Previously, the @reject message was shown to
    the sender.
 -- Added NO_PARSE attribute flag to control whether $-commands and
    ^-listens match the evaluated or unevaluated input.
 -- @program now traverses an object's parents for the requested
    attribute.
 -- Fixed @mail/fwd to evalute the postpended and prepended text without
    evaluating the forwarded text.
 -- Added the local.cpp patch surface. Details in LOCAL readme.
 -- Allowed more substring matches in regexp $-commands, regmatch(),
    regrab(), etc., though some matching substrings may not be observed.
 -- Ashen-Shugar contributed a muxdbpuller tool which can extract an
    object by dbref from a flatfile in @decomp format.  This can use useful
    for restoring accidently @nuked objects from backups.  It is located
    in mux2.4/src/tools.
 -- Draken Korin (with some help from Ian) submitted a 'Reality Levels'
    option.  This is version one, and it still requires some attention,
    but to enabled it, use ./configure --enable-realitylvls.
 -- Ashen-Shugar added the restrict_home configuration option.
 -- Added support for MEMORY_BASED to the ./Backup script.
 -- Ian added a wildcard argument to comlist and @clist commands as
    well as displaying these lists in sorted order.
 -- Ian added support for multi-character delimiter to LAST() function.
 -- Ian added support for DIE() to return a list of rolls rather than
    just the sum.


Bug Fixes:
~~~~~~~~~
 -- Solaris build needed a missing HAVE_FCNTL_H.
 -- First argument argument of udefault(), edefault(), and default()
    supported <dbref>/<attrname>, but not just <attrname>.  But
    introduced in MUX 2.2 timeframe.
 -- While the server hasn't allowed mail aliases (@malias) larger than
    100 members for awhile, it did not protect itself properly against
    mail aliases saved in older mail.db files.
 -- @backup now works with MEMORY_BASED build.
 -- Added missing @fsay help topic.
 -- Added more messages to @destroy/instant path.
 -- Guest attributes weren't being wiped as intended.
 -- Fixed @hook IGSWITCH again.  This time, the bug is related to the
    search_nametab() interface.
 -- Fix @notify/foo123 where foo123 is a never-before-used attributes.
    Legacy bug from MUX 1.6.
 -- Tightend up command piping to log expensive piped commands and also
    improve the interaction with @break and lag_limit.
 -- Fixed bug in MIX() where '&mixit me=(%0|%1);think mix(mixit,0 1,1)'
    gives '(0|1)' instead of '(0|1) (1|)'.  It wasn't determining the
    length of the first list correctly.
 -- Allow code on rooms to use @oemit.
 -- Move initialization of time code further up so that the logging
    code creates the right timestamp.
 -- @dbck started fixing quotas in MUX 2.3, but this is too expensive
    to do routinely.
 -- Locks failed to evaluate properly after a dbref within the lock was
    @destroy.
 -- Add ',()^$' to the set of characters escaped by ESCAPE().
 -- Fix unlikely but reproducible case of hanging @dump/@backup.
 -- Fixed suggestions/bugs from static analysis tool.
 -- Fixed some 64-bit warnings.
 -- Release comsys and @mail properly for guests.
 -- Document the see_hidden @power.
 -- Attribute permissions are documented more completely in the
    'attribute permission' topic.
 -- Clarified help topics 'helpfile' and 'raw_helpfile'.
 -- The minimal set of guests were never being added back to the Guests
    channel.
 -- @hook/igswitch tweaked so that if any switch from the user doesn't
    match the built-in hardcoded switched, softcode has a chance to
    process the command.
 -- Defer closing a session until output is completely flushed
    (Win32-only issue).
 -- Don't destroy a channel just because a controlling object is @nuked.
 -- Fixed SIGSEGV in AFTER() with accent characters in the pattern.
 -- Fixed uninitialized variable problem with an empty ladd().  It
    returned the result of the last operation.
 -- Fix permission hole where a @lock can be used to obtain someone's
    location.
 -- Fix TRIM() so that it doesn't leave a separator on the right side.
 -- Remove the different 'Icons' appearance from a MATRIX room.  There
    are other ways of accomplishing the same effect now.
 -- Document @queuemax and @cboot/quiet.
 -- Let band(), bor(), and bxor() take a variable number of arguments.
 -- Added strmem() to return the number of bytes required to represent
    a string in memory. strlen() returns the visual length of a string.
 -- Allow vadd() and vsub() to mix vector or scalar arguments.
 -- Allow conn_timeout of 0 indicate that connection timeouts should be
    disabled.
 -- Limit the number of pcreates permitted per hour to be controlled by
    pcreate_per_hour configuration option.
 -- When a user disconnect or connects, announce their presence on a 
    channel once regardless of how many aliases they have for that
    channel.
 -- Add case-insensitive sort option to sort().
 -- Use correct units in the @mail, attriute name, and new player
    throttles.
 -- Avoid several situations in which the forked process and main
    process would both attempt to update an attribute value. The forked
    process should never attempt to update any attributes values.
 -- Traverse pcache list properly (introduced in 2.4.0.15) to avoid
    orphaning cache records and failing to flush A_MONEY updates to the
    database.
 -- Fix crashing bug in @clist/full with a heavily ANSI-ied owner name.
 -- Documented @mail/bcc (blind carbon-copy).
 -- The $GAMENAME.pid file option in mux.config was not surviving
    @restart.
 -- Fixes for @mail and @program from 2.4.0.17 changes.
 -- Add FreeBSD-friendly checks for ieeefp.h to choose double-precision
    floating-point properly on FreeBSD.
 -- Add Solaris-friendly checks for fenv.h, fesetprec(), and
    fegetprec() to choose double-precision floating-point properly on
    Solaris without inadvertently trying to use fenv.h on MacOS or SuSE.
 -- local_data_create() in local.cpp was not being called for the
    create() side-effect function.  Found and fixed by Alierak.
 -- lstack() left a trailing output separator (space).  It also contains
    some unreachable code.  Found and fixed by Alierak.
 -- VDIM() referenced uninitialized memory.  Borrowed the correct
    implementaiton from WORDS() since the two are nearly identical.
    Found and fixed by Alierak.
 -- Fix @mail/quick evaluation from 2.4.0.18 so that spaces are not
    compressed.
 -- Fix unexploitable buffer overflow with too many substring matches
    in a regexp $-command. Found and fixed by Alierak.
 -- Fixed @dump/flat coruption bug. When the main process and the
    forked, @dumping process are both actively querying the text value
    database, the sequence of lseek/read and lseek/write options
    intermix.  Since the file position state is shared between the
    child and parent process, it was possible for one process to read
    or write the wrote CHash page.  Instead of using lseek/read and
    lseek/write, MUX now either uses pread() and pwrite() or does not
    fork a child to performs the @dump/flat.
 -- The comsys loading procedure not removes references to GARBAGE.
    Previously, it would not add the GARBAGE to any channel, but as new
    objects are creates they would appear on channel at the next
    @restart.
 -- Fix @mail/purge bug where only the first cleared @mail item would
    be purged.
 -- Avoid reference to freed memory when an outputsuffix is set and
    LOGOUT is sent at the login screen. Found and fixed by Alierak.
 -- The logout_cmd_access parameter disables a logged-out command when
    any access restriction, not just need_player, is specified.
 -- Strip ANSI so ^-command matching works with ANSI emits.
 -- Fixed pointer dereference bug in RxLevel() introduced by Brazil
    which caused REALITYLVLS to crash after ./Startmux.


Performance Enhancements:
~~~~~~~~~~~~~~~~~~~~~~~~
 -- Re-worked update_quotas() so that mudstate.now could be removed.
 -- Use nanosleep() or usleep() on Unix if available.
 -- Pulled alloc/free pairs outside an inner loop in switch() and
    fold().
 -- Improve performance by avoiding write-through caching of A_MONEY in
    the player cache. This was probably the primary reason for needing
    one cached hash page per player. Paging is probably secondary to
    this one.
 -- Changed dbconvert-mode so that it creates 8 temporary files when
    loading a flatfile instead of 4.
 -- Changed attribute cache so that it retains knowledge that an
    attribute value does not exist in the database.
 -- Maintain hash page cache as a double-linked list ordered by recent
    use. Previously, finding the oldest entry required looking at a
    counter in every entry. This improved AllocateEmptyPage()
    performance.
 -- No longer call fsync() when in dbconvert mode.
 -- Mapping page offsets to cache entries has been re-done.  There is
    now a corresponding 'directory' containing all the indices of the
    cache entries.  This is maintained similarly to the directory of
    offsets (which is written to netmux.dir).  To maintain this linkage
    properly, it is necessarily to update ranges of entries which
    correspond to the hash page in the cache.  Previously, the lookup
    was accomplished by looking at recent queries, and if that failed to
    give the answer, it looked at all the cache entries to find a match.
    This improved ReadCache() performance as the corresponding cache
    entry is now always known.
 -- Avoid scanning an object's attributes in Hearer() or sweep_check()
    if it is already known to have @listen or is not set MONITOR.


Cosmetic Changes:
~~~~~~~~~~~~~~~~
 -- Increased the space available to WHO for @moniker names to provide
    more room for more ANSI transitions.
 -- Remove references to have_macros in wizhelp.txt
 -- Removed mention of SIDEFX flag from help topic as this is an
    Rhost-ism.


Miscellaneous:
~~~~~~~~~~~~~
 -- Added ATTACK notes.
 -- Added @folder as an alias for @mail/folder and @file as an alias for
    @mail/file.
 -- Remove configure checks for mktime() and timelocal().
 -- Alierak removed the last two direct uses of delim_check in lnum()
    and lcmds().
 -- Alierak removed stale code in add_player_name() since disallowed
    names are stored separately.
 -- Alierak moved the login mail check into announce_connect() to
    clarify the purpose of record_login().
 -- Alierak refactored the logged-out commands code, removing some
    unreachable code in do_command() and clarifying how logged-out
    commands are handled.
 -- Alierak removed duplicated code relating to setting the MONITOR flag.
 -- Included REALITY and REALITY.SETUP readme files which were
    previously left out of the distribution.
 -- Removed BTMUX patch surfaces as their approach has changed.
 -- Fixed various minor GCC 4.0 build issues.
 -- Verify that pread() and pwrite() can actually be used.
 -- Ashen-Shugar provided muxdbpuller which allows individual objects
    (and attributes on those objects) to be extracted from an offline
    flatfile.  The result is in an @decomp format suitable for quoting.