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

@ -561,8 +561,13 @@ namespace ServerManagerTool.Windows
await server.StartAsync();
var startupMessage = Config.Default.Alert_ServerStartedMessage;
if (Config.Default.Alert_ServerStartedMessageIncludeIPandPort)
startupMessage += $" {Config.Default.MachinePublicIP}:{serverProfile.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}", serverProfile.QueryPort.ToString());
startupMessage += $" {ipAndPortMessage}";
}
PluginHelper.Instance.ProcessAlert(AlertType.Startup, serverProfile.ProfileName, startupMessage);
await Task.Delay(2000);