diff --git a/Plugins/AutomessageFeed/Configuration.cs b/Plugins/AutomessageFeed/Configuration.cs index 0b8052bac..829cd820f 100644 --- a/Plugins/AutomessageFeed/Configuration.cs +++ b/Plugins/AutomessageFeed/Configuration.cs @@ -1,5 +1,4 @@ -using SharedLibraryCore; -using SharedLibraryCore.Interfaces; +using SharedLibraryCore.Interfaces; namespace AutomessageFeed { @@ -11,16 +10,6 @@ namespace AutomessageFeed public IBaseConfiguration Generate() { - EnableFeed = Utilities.PromptBool(Utilities.CurrentLocalization.LocalizationIndex["PLUGINS_AUTOMESSAGEFEED_PROMPT_ENABLE"]); - - if (EnableFeed) - { - FeedUrl = Utilities.PromptString(Utilities.CurrentLocalization.LocalizationIndex["PLUGINS_AUTOMESSAGEFEED_URL"]); - MaxFeedItems = Utilities.PromptInt(Utilities.CurrentLocalization.LocalizationIndex["PLUGINS_AUTOMESSAGEFEED_PROMPT_MAXITEMS"], - Utilities.CurrentLocalization.LocalizationIndex["PLUGINS_AUTOMESSAGEFEED_PROMPT_MAXITEMS_DESC"], - 0, int.MaxValue, 0); - } - return this; } diff --git a/Plugins/Login/Configuration.cs b/Plugins/Login/Configuration.cs index d7f3b99bb..73d5f4b1b 100644 --- a/Plugins/Login/Configuration.cs +++ b/Plugins/Login/Configuration.cs @@ -9,7 +9,6 @@ namespace IW4MAdmin.Plugins.Login public IBaseConfiguration Generate() { - RequirePrivilegedClientLogin = Utilities.PromptBool("Require privileged client login"); return this; } diff --git a/SharedLibraryCore/Configuration/ApplicationConfiguration.cs b/SharedLibraryCore/Configuration/ApplicationConfiguration.cs index fecf191e7..5775c03db 100644 --- a/SharedLibraryCore/Configuration/ApplicationConfiguration.cs +++ b/SharedLibraryCore/Configuration/ApplicationConfiguration.cs @@ -85,7 +85,7 @@ namespace SharedLibraryCore.Configuration public bool EnableWebfrontConnectionWhitelist { get; set; } [LocalizedDisplayName("WEBFRONT_CONFIGURATION_WHITELIST_LIST")] - public string[] WebfrontConnectionWhitelist { get; set; } = new string[0]; + public string[] WebfrontConnectionWhitelist { get; set; } = Array.Empty(); [LocalizedDisplayName("WEBFRONT_CONFIGURATION_CUSTOM_LOCALE")] [ConfigurationLinked("CustomLocale")] @@ -122,13 +122,13 @@ namespace SharedLibraryCore.Configuration public int AutoMessagePeriod { get; set; } [LocalizedDisplayName("WEBFRONT_CONFIGURATION_AUTOMESSAGES")] - public string[] AutoMessages { get; set; } = new string[0]; + public string[] AutoMessages { get; set; } = Array.Empty(); [LocalizedDisplayName("WEBFRONT_CONFIGURATION_GLOBAL_RULES")] - public string[] GlobalRules { get; set; } = new string[0]; + public string[] GlobalRules { get; set; } = Array.Empty(); [LocalizedDisplayName("WEBFRONT_CONFIGURATION_DISALLOWED_NAMES")] - public string[] DisallowedClientNames { get; set; } = new string[0]; + public string[] DisallowedClientNames { get; set; } = Array.Empty(); [LocalizedDisplayName("WEBFRONT_CONFIGURATION_MAP_CHANGE_DELAY")] public int MapChangeDelaySeconds { get; set; } = 5; @@ -156,7 +156,7 @@ namespace SharedLibraryCore.Configuration [ConfigurationIgnore] [LocalizedDisplayName("WEBFRONT_CONFIGURATION_PRESET_BAN_REASONS")] - public Dictionary PresetPenaltyReasons { get; set; } = new Dictionary + public Dictionary PresetPenaltyReasons { get; set; } = new() { { "afk", "Away from keyboard" }, { "ci", "Connection interrupted. Reconnect" } }; [LocalizedDisplayName("WEBFRONT_CONFIGURATION_ENABLE_PRIVILEGED_USER_PRIVACY")] @@ -198,7 +198,7 @@ namespace SharedLibraryCore.Configuration : ManualWebfrontUrl; [ConfigurationIgnore] public bool IgnoreServerConnectionLost { get; set; } - [ConfigurationIgnore] public Uri MasterUrl { get; set; } = new Uri("http://api.raidmax.org:5000"); + [ConfigurationIgnore] public Uri MasterUrl { get; set; } = new("http://api.raidmax.org:5000"); public IBaseConfiguration Generate() { @@ -207,22 +207,7 @@ namespace SharedLibraryCore.Configuration EnableWebFront = loc["SETUP_ENABLE_WEBFRONT"].PromptBool(); EnableMultipleOwners = loc["SETUP_ENABLE_MULTIOWN"].PromptBool(); - EnableSteppedHierarchy = loc["SETUP_ENABLE_STEPPEDPRIV"].PromptBool(); - EnableCustomSayName = loc["SETUP_ENABLE_CUSTOMSAY"].PromptBool(); - - var useCustomParserEncoding = loc["SETUP_USE_CUSTOMENCODING"].PromptBool(); - if (useCustomParserEncoding) - { - CustomParserEncoding = loc["SETUP_ENCODING_STRING"].PromptString(); - } - WebfrontBindUrl = "http://0.0.0.0:1624"; - - if (EnableCustomSayName) - { - CustomSayName = loc["SETUP_SAY_NAME"].PromptString(); - } - EnableSocialLink = loc["SETUP_DISPLAY_SOCIAL"].PromptBool(); if (EnableSocialLink)