Tours: Don't allow pipes in names set by /tour create

This commit is contained in:
Mia 2023-09-27 21:11:11 -05:00
parent 0af724a0f0
commit 3d1790fab9

View File

@ -1297,6 +1297,11 @@ function createTournament(
output.errorReply("You cannot have a player cap that is less than 2.");
return;
}
if (name) {
output.checkChat(name);
if (name.includes('|')) output.errorReply(`The tournament's name cannot include the | symbol.`);
return;
}
const tour = room.game = new Tournament(
room, format, createTournamentGenerator(generator, generatorMod, output)!, playerCap, isRated, name
);