Global Setting Changes

- Global Backup Settings - added option to include/exclude the SaveGames folder in the worldsave backup (default exclude).
- Global Alert Settings - added new textbox allowing the formatting of the ipaddress and port in the server startup message (default {ipaddress}:{port}).
This commit is contained in:
Brett Hewitson 2022-05-07 14:22:25 +10:00
parent d0a6b15eb2
commit a176a04362
24 changed files with 530 additions and 282 deletions

View file

@ -309,8 +309,13 @@ namespace ServerManagerTool
UpdateLastStartedDetails(true);
var startupMessage = Config.Default.Alert_ServerStartedMessage;
if (Config.Default.Alert_ServerStartedMessageIncludeIPandPort)
startupMessage += $" {Config.Default.MachinePublicIP}:{this.Settings.QueryPort}";
if (Config.Default.Alert_ServerStartedMessageIncludeIPandPort && !string.IsNullOrWhiteSpace(Config.Default.Alert_ServerStartedMessageIPandPort))
{
var ipAndPortMessage = Config.Default.Alert_ServerStartedMessageIPandPort
.Replace("{ipaddress}", Config.Default.MachinePublicIP)
.Replace("{port}", this.Settings.QueryPort.ToString());
startupMessage += $" {ipAndPortMessage}";
}
PluginHelper.Instance.ProcessAlert(AlertType.Startup, this.Settings.ProfileName, startupMessage);
await Task.Delay(2000);