mirror of
https://github.com/MSWS/TTT.git
synced 2025-12-05 22:20:25 -08:00
Allow testing rounds with whitespace in name
This commit is contained in:
@@ -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}");
|
||||
|
||||
Reference in New Issue
Block a user