TinyMUX 2.2:  CHANGES
Last Update:  December 2004

Major changes that may affect performance and require softcode tweaks:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 -- Removed support for RADIX_COMPRESSION.
 -- Related to %@ (caller) below, some functions have altered (enactor,
    caller, executor) than MUX 2.1. In some places, these changes fixed
    what can certainly be argued as wrong behavior. In some places,
    the changes are made for the sake of consistency across the codebase.
 -- convtime() now returns '#-1 INVALID DATE' instead of -1 when it cannot
    parse the time string because '-1' is a valid time stamp.
 -- IFELSE() now uses the BOOLEAN convention instead of pseudo-BOOLEAN-Z
    convention.
 -- Released sources and binaries under the Artistic License.


Feature Additions:
~~~~~~~~~~~~~~~~~
 -- Bug #323 - Implemented %@ (caller) substitution as defined previously
    by PennMUSH.
 -- Replaced Spencer's regmatch package with Perl regular expressions (PCRE).
    Implemented by Raevnos.
 -- Turned on fractional seconds for time(), secs(), convtime(), and
    convsecs().
 -- Bug #743 - @doing should allow /unique switch to specify only current
    port.  Patch from Jake.
 -- Bug #556 - Add PennMUSH's right() function. Patch from Jake.
 -- Bugs #567 and #806 - Add connrecord() that gives the most simultaneous
    connections to the game. Patch from Jake.
 -- Bugs #553 and #795 - Add host() function. Patch from Jake.
 -- Bugs #554, #636, #741, and #742 - doing(), cmds(), idle(), conn(), and 
    host() take port# as an argument. Patch from Jake.
 -- Added @cboot/quiet. Patch from Zenty.
 -- Implemented SPELLNUM() with PennMUSH behavior except that the
    two-digit-hundred-pattern is sometimes used (e.g, 'spellnum(1100)' -->
    'eleven hundred' on MUX 2.2 whereas on PennMUSH, 'spellnum(1100)' -->
    'one thousand one hundred'.
 -- Added ROMAN() function which converts numbers between 1-3999 to their
    Roman numeric equivalents.
 -- Changed BOOLEAN VALUES to be consistent more PennMUSH. I needed to be
    able to handle '#-2 AMBIGUOUS' at the least.
 -- In MUX 2.0 and 2.1, many functions would notify the enactor of certain
    error messages (e.g., I don't know which one you mean). This has been
    removed in favor of returning '#-2 AMBIGUOUS' and other error messages
    like '#-1 PERMISSION DENIED', "#-1 NOT FOUND', etc. Command continue
    notify the enactor.
 -- Jake added filterbool().
 -- Permit '#' and '.' as leading attribute name characters.
 -- Log files on the Unix distribution are now handled by the server instead
    of the Startmux script in the same way that log files are handled by
    Win32 distribution. That is, log files are limited to 500KB in size, and
    the server creates log files with the name <mudname>-<date>-<time>.log.
 -- Jake added non-evaluating say/noeval and pose/noeval which are aliased
    to nsay and npose.
 -- Jake added history support for the comsys history. The command is
    '<alias> last[ <n>]'.  See @cset/log. It requires that the channel have an
    associated channel object.
 -- Added ANDBOOL(), CAND(), CANDBOOL(), COR(), CORBOOL(), LAND(), LOR(), and
    ORBOOL().
 -- Added CTU() which stands for 'Convert Trigonometric Units' for
    compatibility with RhostMUSH.
 -- Jake added optional argument to CHANNELS() to restrict the list to channels
    owned by a particular player.
 -- Jake changed config() so that if used with no argument, would return a
    list of available configuration options that are available to that
    particular player.
 -- Adds optional precision argument to time(), secs(), convtime(), convsecs().
    By default, the precision is 0 decimal places, but up to 7 decimal places
    can be requested. Some parts of the server always record 7 decimal places
    (connection times, object creation and modification times). Some parts of
    the server continue to use 0 decimal places (@mail).
 -- LWHO() now has an optional argument which also returns the port number
    with the player's dbref. Added by Jake.
 -- Jake added @ICMD from RhostMUSH which stands for 'Ignore Command'. It's
    a GOD-only command for selectively disabling access to certain commands,
    exits, triggers, etc. against certain players or within certain rooms.
 -- Added HTML attribute flag.
 -- Remove player objects cleanly from @malias and as channel objects at @toad
    and @destroy time. Added by Jake.
 -- Jake added power_alias configuration option.
 -- Jake made the arguments to PLAYMEM() and STATS() optional.
 -- Jake added the ability to retract @mail from a @malias.
 -- SUSPECT messages now report partial connections/disconnections. Added by
    Jake.
 -- Jake added @if (originally from ChaoticMUX).
 -- Jake added Modified timestamp attribute.
 -- Jake added mtime() function, to retrieve Modified. Aliased to modifytime
    and lastmod for Rhost and TM3 compatibility.
 -- Jake added OPEN_OK for opening links to a room, player, or thing.
 -- Jake added @hook. Idea from TinyMUSH 3.x. Code from RhostMUSH with permission.
 -- Jake added OpenLock.
 -- Jake added hook_obj and hook_cmd configuration options.
 -- Jake added BITTYPE() from RhostMUSH with permission.
 -- Made ansi() take multiple arguments. Duplicates RhostMUSH behavior.
 -- Lit() doesn't give an error when fed commas. Added by Jake.
 -- Jake added error().
 -- Added flags(<object>/<attr>) form.
 -- Jake added @speechmod. Originally from ChaoticMUX, code derived from Morgan's.
 -- Jake added @saystring. Originally from RhostMUSH, code derived from Morgan's.
 -- Jake added global_error_obj from RhostMUSH.
 -- Jake added @flag and flag_name. Based on RhostMUSH's.
 -- Jake added train from RhostMUSH.
 -- Jake added itext() and inum() functions. Equivalent to ## and #@, for multiple
    levels of iter(). Idea from PennMUSH.
 -- Added CHR() from RhostMUSH.
 -- Added ORD() from RhostMUSH.
 -- Added STRIPACCENTS() from PennMUSH.
 -- Added NOACCENTS flag from PennMUSH.
 -- Added ACCENT() from PennMUSH.
 -- Added @MONIKER as a combination of @NAMEACCENT from PennMUSH and @ANSINAME
    from RhostMUSH.
 -- Added MONIKER() as a combination of INAME() from PennMUSH and ANSINAME()
    from RhostMUSH.
 -- Jake added STRIP(). Idea from RhostMUSH.
 -- Jake added WRAP(). Based on RhostMUSH's.
 -- Blank lines in configuration are now ignored as if they were comments.
 -- Jake added file/line information in ALLOC/BUG messages. From RhostMUSH.
 -- Added /QUIET switch to @doing command.
 -- Improved signal names from 'SIGTERM' to 'SIGTERM (Terminated)' and from
    'SIGUSR1' to 'SIGUSR1 (Restart Server)'.
 -- Jake extended MIX() from 2 lists to 10 based on code from RhostMUSH.
 -- Let alloc file/line number of atr_get() series of calls point to the file
    and line number where atr_get() was originally called from. Code from
    RhostMUSH. Jake.
 -- Extended exptime() and writetime() to use weeks and 30-day months.
 -- Added MailLock as a new @lock.  Incoming @mail must pass the MailLock or
    it is returned.  Added by Jake.
 -- Added KEEPALIVE flag which, if set, periodically causes a TELNET NOP to
    be sent to the client.  Idea and patch from Soruk.  This is not the same
    as the TCP/IP by the same name.
 -- Added helpfile and raw_helpfile configuration options.
 -- Support sort(-1.05:abc -1.1:def,f).  The previous example is not 
    auto-detected as floating-point number, and this is by design.  However,
    if floating-point is selected explicitly, it will sort by the 
    floating-point prefix.
 -- Enhance validation of exit names. Each segment of an exit name must be
    a valid object name on its own. Also, ANSI is only allowed in the first
    segment. ANSI color in other parts of the name is stripped.
 -- Removed mkindx in favor of having netmux read and index the help files
    itself. The .indx files in the text sub-directory are no longer updated
    or needed.
 -- Added command line options to nextmux for obtaining usage and version
    string.
 -- Added CASE attribute flag to be used in combination with REGEXP flag.
 -- Added -v and -h command line options to netmux.
 -- Added support -p option, netmux.pid, and you can run more than one
    MUX server per Unix account without modifying the Startmux script.
    This feature first appeared in TinyMUSH 3.0.
 -- The lag_maximum configuration option now accepts fractional seconds.


Bug Fixes:
~~~~~~~~~
 -- @mvattr would erase source attribute even if it wasn't allowed to write to
    any of its destinations.
 -- Fixed isnum() with exponents. Uninitialized structure.
 -- Added @dbck/full. Allows in-game access to an option previously only 
    available via dbconvert -c. Patch from Jake.
 -- Rework of dbck routines. More thorough checking and removed some God-only
    crash issues. Patch from Jake.
 -- Fixed entire class of bugs from MUX 1.x that show themselves to one degree
    or another in nearly every part of the server. The issue was first visible
    with enter locks on zones.
 -- Fixed ancient filter() bug where only a prefix of '1' was counted as true.
    Fixed by Raevnos.
 -- Fix uninitialized variable in a utility object used by LROOMS(). Also a
    bug in MUX 2.0 and MUX 2.1. A patch for those will be provided separately.
 -- Fixed SIGSEGV bug in ANSI_String_Copy() which is used by CENTER/LJUST/RJUST
    softcode functions.
 -- Limit how much work can be done in a regular expression.
 -- Bug #438: When a player is @toaded or destroyed, they are not cleaned off
    the @malias. Fixed by Jake.
 -- Adding an additional alias for a channel cleared the comtitle for that
    channel. Fixed by Jake.
 -- Visible() could be used to detect dark wizards.
 -- Bug #597, @mail/proof and blank message. Fixed by Jake.
 -- Idle time didn't update while in an @program. Fixed by Jake.
 -- Allow exits to commit suicide (www.livejournal.com, mushcode journal,
    _Programming Suicidal Exits_ by DrDubious).
 -- Fixed @listcommand when @addcommand'ed commands have previous aliases.
    It only affected the report.
 -- Magic numbers in buffer allocations are now unique to the pool type.
    Recommended by Alierak because on some systems, two of the header sizes
    are equal.
 -- pool_check() needed to verify PCACHE pool as well. Reported by Alierak.
 -- Fix three places where changes from (char) to (const char) broke the
    MEMORY_BASED build. Reported by Chaos from Rogue Space MUX.
 -- Use A_VA name instead of equivalent literal 100. Reported by Alierak.
 -- Fix Prefix-without-suffix bug. Reported by Alierak.
 -- Fix '-0' display for 'think imul(1024,1024,1024,1024,1024,1024,8)'
    Reported by Alierak.
 -- Fix seeding random numbers on Win32. The call to CryptAcquireContext
    was likely to fail.
 -- On a NetBSD/Alpha system in which sizeof(unsigned long) == 8, IPv4 mask
    validation gave false negatives.  Reported by Alierak.
 -- On same NetBSD/Alpha system, reverse-DNS slave was non-functional because
    gethostbyname() choked on the eight-byte IPv4 argument. Reported by 
    Alierak.
 -- IP ranges of the form 'a.b.c.d/m' would allow 'm' to be text and take it
    as a zero value. For example, 'forbid_site 1.2.3.4/foobar' would effectly
    block every IP address -- too easy to shoot yourself in the foot. Reported
    by Alierak.
 -- LROOMS() would not consider the database's last valid dbref. Reported by
    Alierak. Bug introduced by Brazil.
 -- For exits, loc(foo) did not return the same answer as rloc(foo,1). Looks
    like something that's been in there awhile.  Reported by Alierak.
 -- @cemit's to a channel did not affect channel history. Introduced and
    fixed by Jake.
 -- @mail/fwd re-evaluated the fowarded @mail. Fixed by Jake.
 -- Fixed 'round(100,0)' --> '100.00' instead of '100'.
 -- Fixed caller (%@) escape in queued commands.
 -- Bug #157 - @prog + |LOGOUT would crash MUX 1.6, and that was fixed in
    MUX 2 a long time ago, but this recent fix cleans up the connection
    further so that the connection can continued to be used for logging into
    another account. Prompted by Alierak.
 -- Fixed @cemit alloc/free problems from previous check-in.
 -- Fixed @hook/ignore so that it can sometimes not ignore.
 -- Raw_broadcast is sometimes called from the signal handlers, therefore is
    should not be calling memory allocation.
 -- Check in the slave for long hostnames. Alierak.
 -- Long signal names have always been non-functional. Reported by Alierak.
 -- Not an issue due to above bug, but avoid using a temporary buffer that
    would have been too small for the long signal names.  Reported by Alierak.
 -- Use God() macro in chown_all() in case someone tries the multiple-GOD
    hack. Reported by Alierak.
 -- comtitle switch table needed to be terminated. Jake fixed.
 -- Fixed interaction of @hook/ignore and @hook/permit. Jake.
 -- Fixed two memcpy/strip-ansi idioms (one in pos() and one in @decomp).
    Found by Jake.  Bug introduced by Brazil.
 -- Fixed vmul() SIGSEGV.  Reported by Alierak.  Bug from MUX 1.6.
 -- Fixed unlikely SIGSEGV in function table initialization.  Brazil's bug.
    Fixed by Brazil.  Reported by Kieran Boru.
 -- OutOfMemory() and AssertionFailed() reversed sense of bCanRestart.
    Reported by Alierak.  Brazil's bug.
 -- Fixed convtime() SIGSEGV.  Reported by Alierak.  Brazil's bug.
 -- Fixed recently-added zone bug introduce when check_zone() and
    check_zone_for_player() functions were merged.
 -- Fixed crashbug in @speechmod. Some code paths left argument 2
    uninitialized. Bug introduced by Jake. Found and fixed by Brazil.
 -- Fixed set(me/attribute,!flag) form. It was looking for the '!' in the
    first argument instead of the second one. Reported by Sean Hunter.
 -- Fixed bug in fh_god where permission failures were still reported as
    success.  Reported by Sean Hunter.
 -- Accept a single '\' as well as the previously accepted '\\' for an @emit.
    Reported by Vadiv while he was comparing to PennMUSH.  The Tiny* servers
    escape the single '\' away early in the command processing.
 -- Fix ANSI bleeding in exit names. Reported by Jeremy Weatherford. Fix by
    Brazil.
 -- Exit names like ';foo' were effectively DARK exits. If set AUDIBLE, they
    were effectively listening devices that didn't show up on a @sweep.
 -- Fixed behavior of read_remote_desc configuration option.  Bug introduced
    by Jake.  Fixed by Brazil.
 -- Document INFO logged-out command.
 -- @dbck didn't reset bogus home as it intended.
 -- Alierak fix for buffer overflow exploit in slave process.
 -- Alierak fix for logic bug in logging.
 -- Alierak fixes build breakage on Darwin due to inconsistent use of size_t.
 -- Fix SIGSEGV in SCRAMBLE().
 -- Alierak fixes strcat() given that its assumptions about TinyExec are no
    longer true.
 -- Alierak fix for home(bad_obj) logic.
 -- Alierak fixes off-by-one error in wrap().
 -- Only allow printable characters in identd.  The slave process on Unix
    does this.  The threaded implementation for Win32 didn't.
 -- Alierak reported that SCRAMBLE still scrambles characters off the end of 
    the buffer.  He provided a patch that fixed that while not giving a flat 
    distribution.  This final check-in fixed both issues.
 -- Bug fix in mux_memicmp().  mux_memicmp("June ", "june", 4) != 0
    when it should.  Brazil's bug.  mux_memicmp() was added to fix a
    build problem on QNX, so the bug would have been introduce at the
    same time.  It effectively turned off the auto-magic date parsing
    built into convtime(), so if that hasn't been working for you,
    this is the reason why.
 -- Alierak fixes crash case with obscure god-only lock case.
 -- Alierak fixes uninitialized use of second subexpression in attr
    and eval lock cases.
 -- Alierak fixes several stepping past unparse buffer terminator cases. 
 -- Alierak perks up boolexp generally.
 -- Players creating themselves from the welcome screen could cause
    NOSPOOF-related messages to show a random executor to other players
    on the Public channel.
 -- Player names weren't validated properly. Instead of
    Tiny_IsPlayerNameCharacter[], the code was using
    Tiny_IsObjectNameCharacter[].
 -- Fixed the bCanRead/read_remote_desc bugs.
 -- Fixed SIGSEGV bugs related to characters with the high-order bit
    set.  Introduced, found, and fixed by Brazil.
 -- Same as above in translate_string() reported by Sean Hunter.  Fixed
    by Brazil.
 -- Fixed test_time_t() for 64-bit platforms. Reported by Alierak.
    Fixed with Alierak.  Daylight Savings Time information would have
    been missing on at least some and possibly all 64-bit platforms.
 -- Fixed @flag so that it functions.  Reported by Marlek.  Brazil's bug.  
    Fixed by Brazil.
 -- Fixed flag_name documentation.
 -- Fixed SIGSEGV bug in UpdateOffsetTable(). This function maintains
    a table of DST/zone differences and the interval of time over which
    the DST/zone difference is valid. There are typically two intervals
    per calendar year (DST in force and not).  The table can whole 50
    entries (or 25 years worth).
 
    If the table was full, and the Least-Recently-Used (LRU) entry is
    the last entry in the table, and we are adding an entry beyond the
    interval covered by the last entry, then a SIGSEGV can occur.
    Reported by Anomaly/nails.  Brazil's bug.  Fixed by Brazil.

    A broader case of this one was originally reported by Lucifer
    against MUX 2.1 and fixed 2001-OCT-16.  The fix wasn't sufficient.
 -- Bug #557, #558, #559, and #560 were all buffers smaller than the
    largest possible result.  All reported by Morgan 2000-OCT-15.  Fixed
    (finally) by Brazil.  Bugs from MUX 1.6.
 -- Initialize idle time for the sake of SITEMON-related WHO reports.
    Zenty's bug.
 -- Protect d->player access with DS_CONNECTED test to avoid depending
    on the existance of #0. Flags on #0 were controlling the behavior
    of logged-out connections. Now, you can load an empty flatfile,
    create a player (which will be dbref #0), and proceed from there.
    This isn't recommended, but the server doesn't crash if you try it.
    Bug from MUX 1.6.
 -- Kill the slave process on @shutdown.  Reported by nails.  Fixed by
    Brazil.  Brazil's bug.  Introduced in MUX 2.0 when the Win32 and
    Unix sources were merged. The required block of code was accidently
    left out. 
 -- Clean up zombie slave processes on @restart.  Bug from MUX 1.6.
 -- grep() and grepi() weren't preparing properly for accented
    characters.  Brazil's bug.
 -- Execute @hook code in the context of the hook_obj instead of as the
    player.  Jake's bug.
 -- Configuration script bug that affected MacOS build.  Reported by
    Alierak.
 -- Fixed ANSI color leak for case near the size of an LBUF.  Reported
    by Alierak.
 -- PushPointers tag was wrong.  Reported by Alierak.
 -- Memory leak in objeval().  Reported by Alierak.
 -- Guest system would clear contents of starting_room if a guest it
    created was later re-named.  Zenty's bug.  Fixed by Brazil.
 -- Documented '~' letter for NOACCENTS.
 -- Prevent rooms and exits from using the 'home' command.  Patch by
    Alierak.
 -- cache_names=no configuration would SIGSEGV.  Introduced and fixed by
    Brazil.
 -- encrypt() and decrypt() couldn't handle accented characters.
    Reported by Alierak.  Introduced and fixed by Brazil.
 -- While exits are checked and canonicalized at creation time, it was
    possible to re-@name an exit to a broader range of names.  Patch
    from Alierak.
 -- Document that y-umlaut is not supported.
 -- Tweak article_rule configuration options.  Reported by Alierak.
 -- Fix @unlock with respect to attribute locks.  Attributes could be
    locked, but not @unlocked (except by #1).  Introduced by Jake.
    Reported by Sean Hunter.  Fixed by Brazil.
 -- MakeCanonicalMailAlias() could return a result which was not
    null-terminated.  Reported by Ita'istar@Tandoria. Introduced and fixed
    by Brazil.  Related to the @malias command.
 -- MUX previously wouldn't handle convtime(Sat Apr 26 22:32:24 2003 utc)
    properly because the first-level date parser accepted it as a local
    date (ignoring anything that occured after the year field).  The
    first-level date parser is now more restrictive, and the
    second-level date parser handles it properly.  Reported by Talim.
 -- Fix v(), get(), u(), and probably other functions related to
    attributes on parents.  Broken by Brazil in 2.3.0.11.
 -- Fix to new PCRE code to avoid error in gcc 2.95.
 -- Support obj(name(<dbref>)) where name(<dbref>) contains ANSI color.
    Reported by Bellemore.
 -- @addcommand wasn't initializing @hook command information properly.
    On non-debug builds, this would tend to leave the command in a
    @hook/ignore state.  Therefore, even though the @addcommand was
    successful, a user would still receive a 'Huh?' message.
 -- Specific to the Win32 build with the Intel Compiler,
    'mul(288,power(10,9))' --> '287:00000000' instead of '288000000000'.
    It transformed a floating-point division in Tiny_dtoa() into a
    floating-point multiplication (tangentially, using MMX instructions
    as well).  The -Qprec_div option prevents this optimization and fixes
    the behavior.  As insurance, some additional code also will fix the
    the problem.
 -- Fix @hook/igswitch in case where built-in command does not take any
    switches.
 -- Fix typo in gradian-to-radian conversion factor.
 -- Fix cand(), cor(), candbool(), and corbool() so that %0-%9 are
    evaluated properly.  Reported by Sean Hunter.
 -- Document lag_maximum.
 -- Fix @aahear denial-of-service exploit by preventing @aahear actions
    from nesting beyond 3 levels.  Demonstrated on Shangrila.  Fixed by
    Brazil.
 -- Fixed '@wait obj/attr=...' form of semaphores.  It would work
    exactly once if 'attr' wasn't previously defined in the game.
    Caused by and fixed by Brazil.  Reported by Ian.
 -- regmatch() wasn't handling the full range of return codes from PCRE
    properly.  PCRE contributed by Raevnos.  Fixed by Brazil.
 -- Fixed hang in @dbck when orphaned objects lose both their home and
    their current location.  This crashing bug was probably introduced
    inadvertantly by Jake when he changed the defintion of a good object.
    Fixed by Brazil.
 -- Fixed use of LIBOBJS in Makefile.in so that clean (or initial)
    builds succeed.
 -- Fixes the way accents are encoded and parsed in mail.db and
    flatfiles.  This is an important fix.  Backups of your database are
    not affected, however, without this fix, your server will probably
    not parse your backups correctly if they contain accent characters.
 -- Added missing @fsay help topic.
 -- 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.
 -- Protect the server against @maliases with more than 100 members when
    the mail.db comes from a previous versions of MUX.
 -- Guest creation did not properly strip attributions from previous
    connections.
 -- Move initialization of time code further up so that the logging
    code creates the right timestamp.
 -- Locks failed to evaluate properly after a dbref within the lock was
    @destroy.
 -- 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.


Performance Enhancements:
~~~~~~~~~~~~~~~~~~~~~~~~
 -- Optimized check_access() hardcode function which is frequently used.
 -- Took out unnecessary test against Tiny_IsASCII character class in bsd.cpp
 -- Raevnos updated PCRE.  The updated version does not require
    Raevnos' fix (implemented with C++ exceptions). With this release,
    MUX 2.2 no longer depends on C++ exceptions.


Cosmetic Changes:
~~~~~~~~~~~~~~~~
 -- Added grammatically correct comma after 'shouts'.
 -- Alierak fix for typos in NOTES.
 -- Spell 'separate' correctly in the help files and the source code.


Miscellaneous:
~~~~~~~~~~~~~
 -- Added nattr (so named by TM3) as an alias for attrcnt (pre-existing MUX2
    feature).
 -- Added docs/LIMITS to describe server limits.
 -- Freshened docs/CONVERSION because support for older database formats
    was removed in MUX 2.1.
 -- Switched to using autoconf 2.53.
 -- Documented flag attributes.
 -- Updated CONVERSION.
 -- Documented pass_locks @power.
