From ed78dc24bd816caf3ba01e943ebae1e8d8dcc2ac Mon Sep 17 00:00:00 2001 From: 13xforever Date: Wed, 26 Jun 2024 23:49:09 +0500 Subject: [PATCH] try to sanitize username for warning list mention --- CompatBot/Commands/Warnings.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CompatBot/Commands/Warnings.cs b/CompatBot/Commands/Warnings.cs index 4cc5eb0c..98d7447c 100644 --- a/CompatBot/Commands/Warnings.cs +++ b/CompatBot/Commands/Warnings.cs @@ -326,7 +326,8 @@ internal sealed partial class Warnings: BaseCommandModuleCustom table.Add(warning.Id.ToString(), "+", issuerName, timestamp, warning.Reason, warning.FullReason); } } - var result = new StringBuilder("Warning list for ").Append(userName); + + var result = new StringBuilder("Warning list for ").Append(Formatter.Sanitize(userName)); if (!isPrivate && !isWhitelisted && count > maxWarningsInPublicChannel) result.Append($" (last {showCount} of {count}, full list in DMs)"); result.AppendLine(":").Append(table);