MultiAdmin 3.0.0
For a quick guide on updating to MultiAdmin v3 plus some helpful information: https://pastebin.com/Yma740Xa
- Use FileSystemWatcher instead of read directory loop
- Remove Smod3 color tags
- Fix input keypresses being cut on Linux
- MultiAdmin no longer swaps config files, it now passes their location directly to the game
- Re-write README.md
- Add more configs:
disable_config_validation,share_non_configs, andconfig_location - Made MultiAdmin.exe look for
SCPSL.exeorSCPSL.x86_64based on OS - Rename
OutputThreadtoOutputHandler - Made OutputHandler instance based rather than fully static
- Added proper disposal after the main server loops ends
- Removed
FileManager.cs - Better null handling in
Config.cs - Remove unused event
IEventMatchStart, it was never called - Moved
TimeStampfromServer.cstoUtils.cs - Better null handling in
InputThread.cs - Attempt to stop all servers on program exit
- Re-arrange and organize
Server.cs - Updated .gitignore
- Better null handling for ServerConfig
- Added custom exceptions
- Combined the two memory checkers
- Better null handling for SessionId
- Fixed server crash restarts
- Optimized log file variables to only update when needed, instead of every call
- Re-arrange variable initialization in
Server.csinitialization - Lock thread when reading a server message file
- Changed Session ID to use Ticks instead of Unix Time seconds
- Re-wrote the
NEWcommand for the new multi system - Modified
InputThread.csto not always capitalize input - Added
StartServerFromIdtoProgram.cs - Switched
Program#AutoStartServerDirectoriesfrom creating an instance ofMultiAdminConfigto creating an instance ofServerand usingServer#ServerConfig - Added
Program#ServerIds - Added
Program#AutoStartServerIds - Changed
RestartRoundCounterto check if the round count is greater than equal to the number of rounds to restart - MultiAdmin now uses full paths wherever possible
- Re-worked multi-server execution code to use Server objects for everything
- Changed
Program#StartServerFromId()toProgram#StartServer()and now takes an input of a Server object - Changed
Utils.IsProcessHandleZerotoUtils.IsProcessHeadlessand add a check forProgram.Headless - Use
Utils.GetFullPathSafe(path)now instead ofPath.GetFullPath(path)to prevent an exception and simply return null - Don't run the input thread if MultiAdmin is set to headless mode
- Added headless mode, can be activated with arguments
--headlessor-h OutputHandlershould now handle file read attempts better, sleeping 2 ms between general failed attempts and an extra 3 ms forUnauthorizedAccessExceptionsOutputHandlerfile reading now occurs in a for loop instead of a while loop- Properly
StopServerwhenkillGame = false - Don't exit
MainLoopuntil process ends - Add
closeGametoServer#StopServer() - Properly dispose
GameProcess - Fixed
Server#MainLoop()never exiting - Added new colored console printing system
- Changed the
EXITcommand to attempt to kill the process if being run before any round has started, as that seems to cause issues otherwise - Improved and fixed Soft Memory Restart so it no longer spams and prints out more detailed messages
- Made TimeStamp a property in Utils
- Changed
Utils#TimeStamp()toUtils#TimeStampMessage() - All printing and logging lock a single object as to be thread safe and print in order
- Standardized output reading to watching files, this works both on Windows and Linux effectively
- Watch specifically the session directory, hopefully this should decrease CPU usage for running multiple servers and make it run faster
- Changed server status system, it now uses an enum to tell the current status of the server and restarts internally rather than externally
- Added "IEventWaitingForPlayers", this runs every time the "Waiting for players.." message is sent
- "OutputHandler" now only removes a single newline from the end of a console message
- Put "ProcessFile" in a try catch statement
- Removed process handle check
- Moved "Server#MaVersion" to "Program#MaVersion"
- Reset "EXIT" command on restart so that the process is killed if the server hasn't started yet