From e40908df1466e11fd156f857597f5545e16e5810 Mon Sep 17 00:00:00 2001 From: Dominion Date: Fri, 31 Mar 2023 11:35:25 -0400 Subject: [PATCH] Fix chat commands not handling extra spaces well --- src/Tgstation.Server.Host/Components/Chat/ChatManager.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Tgstation.Server.Host/Components/Chat/ChatManager.cs b/src/Tgstation.Server.Host/Components/Chat/ChatManager.cs index 019e188cfa..c57099f5a8 100644 --- a/src/Tgstation.Server.Host/Components/Chat/ChatManager.cs +++ b/src/Tgstation.Server.Host/Components/Chat/ChatManager.cs @@ -679,7 +679,7 @@ namespace Tgstation.Server.Host.Components.Chat message.User.Channel.IsAdminChannel = mappingChannelRepresentation.IsAdminChannel; } - var splits = new List(message.Content.Trim().Split(' ')); + var splits = new List(message.Content.Trim().Split(' ', StringSplitOptions.RemoveEmptyEntries)); var address = splits[0]; if (address.Length > 1 && (address.Last() == ':' || address.Last() == ',')) address = address[0..^1];