Fix chat commands not handling extra spaces well

This commit is contained in:
Dominion
2023-03-31 11:35:25 -04:00
parent 824850c351
commit e40908df14
@@ -679,7 +679,7 @@ namespace Tgstation.Server.Host.Components.Chat
message.User.Channel.IsAdminChannel = mappingChannelRepresentation.IsAdminChannel;
}
var splits = new List<string>(message.Content.Trim().Split(' '));
var splits = new List<string>(message.Content.Trim().Split(' ', StringSplitOptions.RemoveEmptyEntries));
var address = splits[0];
if (address.Length > 1 && (address.Last() == ':' || address.Last() == ','))
address = address[0..^1];