From c829f5eb02f73bb98d190e453f81bb067b1adaaf Mon Sep 17 00:00:00 2001 From: Goodlyay Date: Sat, 3 Feb 2024 18:29:52 -0800 Subject: [PATCH] Disallow commas in award names Commas break the parser because they are the separator character in playerAwards.txt --- MCGalaxy/Modules/Awards/CmdAwardMod.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MCGalaxy/Modules/Awards/CmdAwardMod.cs b/MCGalaxy/Modules/Awards/CmdAwardMod.cs index a59753217..bf671d9ff 100644 --- a/MCGalaxy/Modules/Awards/CmdAwardMod.cs +++ b/MCGalaxy/Modules/Awards/CmdAwardMod.cs @@ -40,6 +40,8 @@ namespace MCGalaxy.Modules.Awards string award = args[0].Trim(); string desc = args[1].Trim(); + if (award.Contains(",")) { p.Message("&WAward names cannot contain commas."); return; } + if (!AwardsList.Add(award, desc)) { p.Message("This award already exists."); return; } else {