                             Change Log for WolfMUD

This document details the main highlights for each release of WolfMUD. For
detailed information on changes please see the WolfMUD git repository:

             git clone https://code.wolfmud.org/WolfMUD WolfMUD.git


v0.0.10 Released Friday 6th July, 2018
==============================================================================

Added

  - Added test in recordjar/read_test.go for duplicate field names.
  - Added tests in recordjar/read_test.go for colons without field names.
  - New configuration option Server.LogClient to enable or disable logging of
    connecting client's IP address on initial connection. Defaults to disabled.
  - New log package for per-connection logging.
  - Log account login.
  - Log account creation.

Changed

  - Improved reporting on which jar test failed in recordjar/read_test.go
  - The comms package now logs using per-connection sequence numbers.
  - Combine writing of "bye bye" and resetting default colours when closing
    connection to client.
  - Switched comms and frontend packages to use new log package.
  - If the new configuration option Server.LogClient is set to false don't leak
    IP addresses via system error messages. Instead replace the 'address:port'
    string with '???' when logging the error.

Fixed

  - Corrected comments in frontend.go to reference closedError instead of
    Error.
  - Fixed panic when empty string passed to text.TitleFirst function.
  - In recordjar/read_test.go reported values for mismatches are reversed.
  - Cleaned up white-space in the default configuration file.

v0.0.9 Released Monday 28th May, 2018
==============================================================================

Added

  - The recordjar.decode.indexSeparator helper function.
  - Boolean values can now be present/absent as well as set to true/false in
    zones files. For example OPEN is the same as OPEN=true, omitting OPEN is
    the same as OPEN=false. Included zone files updated where appropriate.
  - Added StringList, KeyedString and KeyedStringList functions to package
    recordjar/encode.
  - All attributes now implement a Marshal method.
  - Added an attr.Thing.Collectable method.
  - New SAVE command to write player data to player files.
  - Added a collectable bag and sack to the tavern in the Zinara zone for
    testing player saves with containers.
  - Added 'on the fly' resets to cmd.junk.dispose method so that items without
    a reset specified can be forcibly reset.
  - Added recordjar.decode.DateTime function.
  - Added frontend.login.assemblePlayer to build a player from a recordjar.Jar.
  - New attr.Gender attribute.
  - New text.Uncomment function to remove comments embedded in strings. For
    example in regular expressions commented like Perl's /x modifier.
  - Commented recordjar.splitLine regular expression and added tests.
  - New attr.Thing.NotUnique method to mark a Thing as non-unique when building
    temporary stores - when loading zone and player record jar files (*.wrj).

Changed

  - Improved reporting of unknown attributes when loading zone/player files.
  - The recordjar/decode functions PairList and StringList now return a
    map[string]string instead of [][2]string.
  - The recordjar/encode PairList now takes a map[string]string and rune
    delimiter instead of [][2]string and a string delimiter.
  - The recordjar/decode function KeyedString now returns name and value
    strings instead of a [2]string array.
  - Cleaned up the KeyedString and PairList functions in recordjar/decode.
  - attr.Attribute.Marshal now returns a tag string and []byte data.
  - The QUIT command now saves players. Any non-collectable items are disposed
    of and reset.
  - Added account information to attr.Player so that an account header record
    can be written to the player file when saving the player.
  - frontend.login.passwordProcess now uses frontend.login.assemblePlayer.
  - Updated frontend.account.write to build a new player using attr.* types.
    Resulting new player file is written using the new SAVE command.
  - recordjar.Read reimplemented for clarity.
  - recordjar_test.compareJar helper rewritten and renamed compare.
  - Tests for recordjar.Jar.Write rewritten, cleaned up and improved.
  - Temporary attr.Attribute.Marshal method used in development dropped.

Fixed

  - The recordjar.Jar.Write now wraps long lines to 80 characters and
    title-cases field names.
  - In attr.Thing.SetOrigin drop redundant Inventory lookup.
  - recordjar.Jar.Write no long writes an extra leading space before a field
    name.
  - recordjar.Jar.Write now normalises field names.
  - recordjar.encode.Duration now omits trailing zero units.
  - Added missing colon to Name and Description attributes in DUMP command.
  - All package comments now start with 'Package X...'.

v0.0.8 Released Tuesday 31st October, 2017
==============================================================================

Added

  - The Reset attribute now has an Abort method to cancel reset events.
  - New player zone, Zinara Caves - was the newbie zone in the Java version.

Changed

  - The exits.Within method now take an additional has.Inventory parameter. See
    fixes below for details.
  - Command handlers are now types instead of simple functions.
  - Implementation of JUNK command cleaned up.
  - The VERSION command now includes the version of the compiler used.
  - The handler for the empty command is now in its own cmd/cmd.go file.
  - The state.handleCommand method has been moved to the handler.go file.
  - The cmd package no longer exports the AddHandler function.
  - If something is in the game it is always somewhere. Therefore, we can drop
    redundant checks of where we are from command processing.
  - Logic for removing events has been dropped from the Inventory attribute and
    moved to the GET and TAKE commands. This means the logic does not have to
    processed every time a Thing is moved - only when the GET or TAKE commands
    are used. It also removes a lot of 'magic' from the Inventory code.
  - Logic for adding events has been dropped from the Inventory attribute and
    moved to the DROP and PUT commands. This means the logic does not have to
    processed every time a Thing is moved - only when the DROP or PUT commands
    are used. It also removes a lot of 'magic' from the Inventory code.
  - The JUNK command no longer has to deal with the weird issue of handling
    copies that are spawned when junking a respawnable Thing.
  - The Inventory.Move method no longer checks if a Thing has a Locate
    attribute. This is now only done when a Thing is first added to an
    Inventory.
  - The Inventory Move method no longer returns a Thing.
  - The player count is now included in the DUMP information for an Inventory.
  - The Inventory Add and Remove methods now add and remove Thing to or from
    the Inventory disabled list. The AddDisabled method has been dropped.
  - Split RecordJar encoder/decode in own sub-packages.

Fixed

  - Made exits.Within work as expected/intended. The first returned slice
    should always be the current location. If the current location had no exits
    the parent could not be determined to find the current location so it was
    not populated in the returned slice. As a result the exits.Within method
    now takes an additional has.Inventory parameter for the current location.
  - The Inventory attribute Copy and Free methods should also process Thing in
    the disabled list.
  - The JUNK command should cancel action events and the $RESET command
    re-enable them.
  - The JUNK command should cancel active Cleanup events.
  - Fix Thing spawn check in GET and TAKE commands which prevented Thing
    without a Reset attribute from being taken, even though on screen messages
    indicate success.
  - Fix data race cause by zone loader not locking Inventory attributes while
    manipulating them.

v0.0.7 Released Sunday 10th September, 2017
==============================================================================

Added

  - New Inventory.Outermost method to find the top most Inventory in an
    Inventory hierarchy.
  - New CONTRIBUTORS, CONTRIBUTING and DVO (Developer's Certificate of Origin)
    files added.
  - A Thing in an Inventory can now be taken out of play (disabled) and put
    back into play (enabled). This is the main mechanism used to avoid data
    races when an item resets or respawns as it allows the item to be locked
    via a BRL even when out of play.

Changed

  - Rewritten #DEBUG command.
  - Dropped remaining references to Server.Debug configuration value.
  - Make Locate attribute concurrent safe - fixes data race.
  - Make Thing attributes concurrent safe - fixes data race.
  - Updated sources to use idiomatic standard libraries imported first.
  - Updated sources to use idiomatic 'Mutex hat' style in types.
  - cmd.state.AddLock and cmd.state.CanLock automatically always lock the BRL
    for the top most Inventory in a hierarchy.
  - Performance improvement in comms.fixDEL for 'character at a time' Telnet
    clients.
  - Thing.SetOrigins updated to include disabled items in an Inventory.

Fixed

  - Ignore incomplete/broken pairs when unmarshaling recordjar.
  - Default clean up message now displayed when appropriate.
  - Thing.Remove sets attribute parent to nil.
  - Fixed scripting of JUNK command usage in CLEANUP command.
  - Fixed data race resetting Player prompt in QUIT command.
  - Fixed data race in SNEEZE command.
  - Fixed data race when initially adding player into the world.
  - Using delete key on 'character at a time' Telnet connections no longer
    causes an array index out of bounds error.
  - When using delete key on 'character at a time' Telnet connections
    multi-byte Unicode characters are now handled correctly.
  - A nil *message.Buffer no longer causes a nil pointer error.
  - Accessing the Attribute type parent methods is now concurrent safe - fixed
    data race.
  - Resetting and respawning of items now uses Inventory item enabling and
    disabling - fixes data races.
  - Reworked JUNK command - fixes data races.
  - Only set file permissions on created files when operating system and file
    system permits. This fixes an issues on Windows preventing user logging in
    to the server after creating a new account.


v0.0.6 Released Sunday 1st May, 2017
==============================================================================

Security

  - Tighten permissions on new player files and file produced by the #DEBUG
    command. It is adviseable to run chmod 0660 data/players/*.wrj on Linux. On
    Windows please review the file permissions for existing files.
    Commit: da2ed6b and eefef4b.

  - Reduce the amount of time plain text passwords are held in memory. Some
    player passwords may have been compromised due to use of the #DUMP command
    and access to the heapdump file. Some player passwords may have been
    compromised if local users can access the server's memory.
    Commit: b29e762.

Added

  - New OnCleanup attribute for custom clean up messages, see
    docs/zone-files.txt for more details.
  - New OnReset attribute for reset/respawning up messages, , see
    docs/zone-files.txt for more details.
  - New OnAction and Action attributes, see docs/zone-files.txt for more
    details.
  - Inventories have a new Players method for checking if there are any players
    in an inventory.
  - New #DEBUG command to aid developing and debugging.

Changed

  - Output of READ command made more generic. Instead of the template being
    "You read the writing on <item>. It says: <writing>" it is now "You read
    <item>.  <writing>".  Wording of WRITING attributes in zone files may need
    updating.
  - If a reset or respawn occurs within a container and an OnReset message is
    provided the message will propagate to the location the container is in.
  - Zone files updated with OnCleanup and OnReset messages.
  - Prevention of players being junked now via automatic veto.
  - Statistics in log now display a Thing count.
  - Lease acquired and released messages no longer reported in log.
  - Improved debugging flags in config.wrj, see docs/configuration-file.txt for
    more details.
  - Event goroutines now recover from a panic unless Debug.Panic is true. See
    docs/configuration-file.txt for more details.

Fixed

  - The LOOK command now automatically uppercases the first letter in titles.
  - The TAKE command now automatically uppercases the first letter of a
    container's name.
  - Improved layout of event.Cancel in #DUMP output.
  - The #DUMP command no longer crashes the server with invalid addresses.


v0.0.5 Released Sunday 2nd April, 2017
==============================================================================

Added

  - Events gained jitter to introduce randomness to timing.
  - New mechanism added to better free and release resources for garbage
    collection.
  - New Inventory.Move method more efficient for the common case of moving
    something from one Inventory to another. Add and Remove methods updated to
    use Move. Commands updated to use new Move where possible.
  - Added automated resets and spawning to items via new Reset attribute.
  - New $RESET and $SPAWN scripting commands.
  - New JUNK commands for player to dispose of items.
  - Added automated clean ups to items via new Cleanup attribute.
  - When debugging the DUMP command can now take the address of a Thing.
  - New unique ID generator - all Thing now have a unique ID and unique alias.

Changed

  - Added jitter to Door attributes to add some randomness.
  - Inventory now add a Locate attribute to a Thing when it is put into an
    Inventory.
  - Zone loader rewritten and improved.
  - Reported memory stats in the log are now more accurate.
  - Buffers in the message package reworked to be more efficient with the
    addition of a reusable pool of buffers.
  - Exits.List method improved to create less garbage and use less string
    concatenation.
  - Updated items in zones with new Reset attribute.
  - Updated items in zones with new Cleanup attribute.
  - Inventories where the parent Thing has a narrative attribute no longer
    display 'It is empty' when there are no non-narrative content.

Fixed

  - Doors can now be placed between zone where on side is in one zone and the
    'other side' is in a different zone.
  - References are now properly released from slices fixing a minor memory
    leak.
  - Fixed a panic when calling Player.Close on a nil Player pointer. In reality
    not a big issue as it was triggered when the player logged out and didn't
    crash the server unless running in debug mode.
  - Fixed decoder.Duration in recordjar package so that it can parse uppercased
    data passed to it.

Known bugs

  - When using the DUMP command with memory addresses it's to easy to crash the
    client thread. Comments have been added warning of this and DUMP with a
    memory address is only enabled when the server is run in debug mode.


v0.0.4 Released Thursday 2nd March, 2017
==============================================================================

Added

  - Test cases added for rewritten recordjar.Read method.
  - New recordjar data types: StringList, KeyedString, KeyedStringList. See
    docs/zone-files.txt for details.
  - Zone files can now contain vetoes.
  - cmd.state has a new Script method for scripting commands. Commands only
    usable in scripting mode denoted by prefixing the command with a '$'
    symbol.
  - New script only $POOF command to announce players joining game.
  - attr.Inventory gained a Narratives method to retrieve narrative items.
  - new event package for asynchronous scripted commands.
  - text package gained a new TitleFirst method to uppercase the dirst rune in
    a string.
  - All attributes and attr.Thing now have a Copy method. The Copy method has
    also been added to the has.Attribute and has.Thing interfaces.
  - New Door attribute added so that doors can be defined in zone files. See
    docs/zone-files.txt for details.
  - Added the tavern door and shed door to data/zones/zinara.wrj as example
    doors.
  - New OPEN and CLOSE commands to open and close doors.

Changed

  - Rewritten recordjar.Read method to be simpler and have fewer corner cases.
  - EXAMINE command can now be vetoed.
  - zones package now adds a Locate attribute to Things with a Door attribute.
  - zones package now creates the 'other side' of doors when a Thing has a Door
    attribute.
  - Update COMMANDS command to not report scripting only commands starting with
    a '$' symbol.
  - MOVE command can now be vetoed.

Fixed

  - Another colour bleeding issue fixed.
  - Nil panic fixed when loading zones and populating inventories with an
    invalid ref.
  - Passing of a copied mutex in text.Dictionary.
  - recordjar.decoder should uppercase returned key and data as documented.
  - attr.inventory Add method should always call SetWhere if Locate attribute
    is found.

Known bugs

  - Adding a Door attribute to a non-narrative, e.g. directly to a location or
    a moveable item, can result in strange and unexpected behaviour.
  - The new Thing and Attribute copy mechanism does not check for cyclic
    dependencies.

v0.0.3 Released Friday 23rd December, 2016
==============================================================================

Fixed

  - Colour bleeding issues fixed (Mainly Windows TELNET)
  - Multiple description sequence fixed so that main descriptions come first.


v0.0.2 Released Monday 5th December, 2016
==============================================================================

Added

  - Text folding now has support for Unicode combining characters.
  - Added NONE as a runtime option to not load any configuration file.
    See docs/running-the-server.txt for details.
  - New messages package containing message buffers.
  - Message buffers now support a silent mode.
  - Commands now send coloured messages:
      - Red: Something bad / undesirable happened
      - Green: Something good / desirable happened
      - Yellow: Something informational happened
  - Server greeting can now contain embeded colour codes.
  - Added initial tests for text and message packages.
  - New docs/upgrading.txt

Changed

  - Improved performance of embedded colour codes.
  - text.Dictionary map now protected by sync.Mutex.
  - Message buffers moved from cmd/state to new message package.
  - Message buffers reimplemented, no longer based on bytes.Buffer.
  - Message buffers now use Send and Append methods instead of WriteJoin.
  - cmd/state and frontend both use new message package for buffers.
  - state.script method uses new message buffers.

Fixed

  - Fixed an issue with TELNET clients sending unprocessed strings containing
    DEL (ASCII 0x7F or \b) characters. Using delete in Windows TELNET client
    now works as expected.
  - Text folding should only preserve leading whitespace.
  - Fixed a panic in text.Fold with a width less than 1.
  - Fixed a panic if player only enters stop words.

Known bugs

  - An extra blank line is sometimes appended to the end of the greeting
    displayed when players connect. This seems to be an issue in the recordjar
    package.
  - If Send or Append is used to start a message and only a colour is written a
    subsequent Append will cause a space to be present at the start of the
    message.

Security

  - None :)


v0.0.1 Released Monday 31st October, 2016
==============================================================================

  Initial release.
