Fixed console title set not working
Optimised command line parsing
Made Utils a singleton to enforce the fact that only one copy should ever exist
Added name to /v2/user/read output as users can be found by id
Added TotalPermissions method to get the combined total permissions as used for HasPermissions
Added totalpermissions to output of /v2/group/read output in RestAPI
Refactored method names to be consistent with function e.g. Off -> ServerOff
Added new endpoints:-
/v2/server/status - Status query including player and rules matching common query tool requirements such as qstat. The json returned uses native types e.g. int's where possible
/v2/groups/list - Lists groups
/v2/groups/read - Query group detail
/v2/groups/destroy - Remove a group
/v2/groups/create - Create a group
/v2/players/list - Lists players including basic details
/v2/users/create - Create a user
/v2/users/list - Lists users basic user details applying a filter if specified.
Refactored missing parameter and error handling to use common utility methods RestError, RestMissingParam which ensures consistency across all functions and protects against null object references
Removed maxplayers from /status to ensure 100% compatibility, this and more details can be found in the new end point /v2/server/status
Protected against null names in user/activelist
Refactored variable checks to use string.IsNullOrWhiteSpace where applicable to capture errors early in the RestAPI
Added the ability to location users by "id" matching the underlying API.
Refactored locating players, bans & users to utility methods to ensure consitency across the api and eliminate duplicate code making for easier maintainence
NOTE: Duplicate and invalid DB entries currently can still be made if the DB format hasn't been updated to with missing unique and not null constaints
Removed { RequiresToken = true } from RestCommand constructors as this is the default anyway.
Optimised function calls so that tests are processed sequentially avoiding unnessasary operations in failure cases
Cleaned up formatting ensuring consistent line endings, indentation and single line if layout
Fixed ServerCommand duplicate key issue for multi line returns, now uses a single "response" string with embeded newlines
Fixed PlayerKill output using verb instead of parameters for "from" option
Fixed console errors for failed parent dependencies of default groups that already exist caused by fb11729547 consistency fixes
Made GroupManager.groups readonly to discourage overwriting it. Could still do with better encapsulation to prevent consistency problems if modified externally.
Added UpdateGroup method to GroupManager
Refactored Group handling of permissions and chatcolor to prevent inconsistent data
Notably:-
* AddPermission now does the right thing when passed the string "!permission"
* Converted ChatColor from method to getter / setter
Added RemovePermission to Group
Refactored GroupManager Permissions handling to ensure consistent data between DB and internal objects
Removed redundent AddGroup method in preference to a default value on the main method
Correct some tabs vs spaces
Added ParentName helper to Group
Fixed inverted parameters to error "Invalid parent {0} for group {1}"