diff --git a/Torch.Server/ViewModels/ConfigDedicatedViewModel.cs b/Torch.Server/ViewModels/ConfigDedicatedViewModel.cs index e0014f1..54b5a7e 100644 --- a/Torch.Server/ViewModels/ConfigDedicatedViewModel.cs +++ b/Torch.Server/ViewModels/ConfigDedicatedViewModel.cs @@ -99,5 +99,26 @@ namespace Torch.Server.ViewModels public int SteamPort { get => _config.SteamPort; set => SetValue(x => _config.SteamPort = x, value); } public string WorldName { get => _config.WorldName; set => SetValue(x => _config.WorldName = x, value); } + + //this is a damn server password. I don't care if this is insecure. Bite me. + private string _password; + public string Password + { + get + { + if (string.IsNullOrEmpty(_password)) + { + if (string.IsNullOrEmpty(_config.ServerPasswordHash)) + return string.Empty; + return "**********"; + } + return _password; + } + set + { + _password = value; + _config.SetPassword(value); + } + } } } diff --git a/Torch.Server/Views/ConfigControl.xaml b/Torch.Server/Views/ConfigControl.xaml index dc8507b..f6c7f04 100644 --- a/Torch.Server/Views/ConfigControl.xaml +++ b/Torch.Server/Views/ConfigControl.xaml @@ -84,6 +84,8 @@