From 58e2b85f5964b28f77f01a7ff75513abc6f0c045 Mon Sep 17 00:00:00 2001 From: ZIT WANG Date: Tue, 25 Apr 2017 20:01:24 +0800 Subject: [PATCH] Fix an issue that causes client crash after receiving long text --- TShockAPI/Utils.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/TShockAPI/Utils.cs b/TShockAPI/Utils.cs index 14c072e3..7e690b84 100644 --- a/TShockAPI/Utils.cs +++ b/TShockAPI/Utils.cs @@ -869,8 +869,13 @@ namespace TShockAPI /// An enumerable list with the matches public void SendMultipleMatchError(TSPlayer ply, IEnumerable matches) { - ply.SendErrorMessage("More than one match found: {0}", string.Join(",", matches)); - ply.SendErrorMessage("Use \"my query\" for items with spaces"); + ply.SendErrorMessage("More than one match found: "); + + var lines = PaginationTools.BuildLinesFromTerms(matches.ToArray()); + + lines.ForEach(ply.SendInfoMessage); + + ply.SendErrorMessage("Use \"my query\" for items with spaces."); } ///