From b410966c3213cc5738a4027bebe89a09b4f25c8f Mon Sep 17 00:00:00 2001 From: ShimmyMySherbet Date: Sun, 4 Dec 2022 23:16:20 +1000 Subject: [PATCH] Made vault IDs case insensetive again --- SherbetVaults/Models/Config/SherbetVaultsConfig.cs | 2 +- SherbetVaults/Models/Utility/VaultSelector.cs | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/SherbetVaults/Models/Config/SherbetVaultsConfig.cs b/SherbetVaults/Models/Config/SherbetVaultsConfig.cs index 4911a87..08148f6 100644 --- a/SherbetVaults/Models/Config/SherbetVaultsConfig.cs +++ b/SherbetVaults/Models/Config/SherbetVaultsConfig.cs @@ -9,7 +9,7 @@ namespace SherbetVaults.Models.Config public class SherbetVaultsConfig : IRocketPluginConfiguration { public DatabaseSettings DatabaseSettings; - public bool CacheVaults = true; + public bool CacheVaults = false; public bool LargestVaultIsDefault = false; public string DefaultVault = "default"; public bool VaultAliasesEnabled = false; diff --git a/SherbetVaults/Models/Utility/VaultSelector.cs b/SherbetVaults/Models/Utility/VaultSelector.cs index d54ee80..97a841f 100644 --- a/SherbetVaults/Models/Utility/VaultSelector.cs +++ b/SherbetVaults/Models/Utility/VaultSelector.cs @@ -1,4 +1,5 @@ -using System.Linq; +using System; +using System.Linq; using System.Threading.Tasks; using Rocket.API; using RocketExtensions.Models; @@ -93,7 +94,7 @@ private VaultConfig GetDefaultVault(LDMPlayer player, out EVaultAvailability ava } public VaultConfig GetVaultConfig(string vaultID) => - Plugin.VaultConfigs.FirstOrDefault(x => x.VaultID.Equals(vaultID)); + Plugin.VaultConfigs.FirstOrDefault(x => x.VaultID.Equals(vaultID, StringComparison.InvariantCultureIgnoreCase)); private VaultConfig GetLargetVault(LDMPlayer player) => GetPlayerVaults(player)