diff --git a/Server/BanLists.cs b/Server/BanLists.cs index 8a393d5..de0e8af 100644 --- a/Server/BanLists.cs +++ b/Server/BanLists.cs @@ -154,6 +154,10 @@ private static void UnbanStage(string stage) { Stages.Remove(stage); } + private static void UnbanGameMode(GameMode gameMode) { + GameModes.Remove((sbyte)gameMode); + } + private static void Save() { Settings.SaveSettings(true); @@ -387,6 +391,17 @@ public static string HandleUnbanCommand(string[] args) { } Save(); return "Unbanned stage: " + string.Join(", ", stages); + + case "gamemode": + if (!GameMode.TryParse(val, out GameMode gameMode)) { + return "Invalid gamemode value!"; + } + if (!IsGameModeBanned(gameMode)) { + return "Gamemode " + gameMode + " is not banned."; + } + UnbanGameMode(gameMode); + Save(); + return "Unbanned gamemode: " + gameMode; } } }