Allow testing rounds with whitespace in name

This commit is contained in:
MSWS
2025-11-10 12:44:27 -08:00
parent 0aa28b1076
commit ad3603c833

View File

@@ -31,9 +31,9 @@ public class SpecialRoundCommand(IServiceProvider provider) : ICommand {
var rounds = provider.GetServices<ITerrorModule>()
.OfType<AbstractSpecialRound>()
.ToDictionary(r => r.Name.ToLower(), r => r);
.ToDictionary(r => r.Name.ToLower().Replace(" ", ""), r => r);
var roundName = info.Args[1].ToLower();
var roundName = string.Join("", info.Args.Skip(1)).ToLower();
if (!rounds.TryGetValue(roundName, out var round)) {
info.ReplySync($"No special round found with name '{roundName}'.");
foreach (var name in rounds.Keys) info.ReplySync($"- {name}");