From 0d9b63bbe83d2d9f90e5cb91d5888bbaccf203d4 Mon Sep 17 00:00:00 2001 From: Skillet Date: Wed, 26 Jul 2023 23:09:22 -0400 Subject: [PATCH] Update mapvote.js --- mapvote.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mapvote.js b/mapvote.js index 8e61115..edd60ac 100644 --- a/mapvote.js +++ b/mapvote.js @@ -645,7 +645,8 @@ export default class MapVote extends DiscordBasePlugin { const versionfilt = gamemodefilt.filter(l => (!cls[3] || (cls[3] === "*" || l.version.toLowerCase().startsWith("v" + cls[3].replace(/v/gi, ''))))); const factionfilt = versionfilt.filter(l => (!cls[4] || (cls[4] === "*" || [this.getTranslation(l.teams[0]), this.getTranslation(l.teams[1])].includes(cls[4].toUpperCase())))); - const factionblack = this.layerfilterFactionBlacklist(factionfilt); + const samelayerfilt = factionfilt.filter((l) => !(rnd_layers.find((rl) => rl.layerid === l.layerid))); + const factionblack = this.layerfilterFactionBlacklist(samelayerfilt); const gamemodewhite = this.layerfilterGamemodeWlist(factionblack); const samemapfilt = gamemodewhite.filter((l) => rnd_layers.filter(l2 => l2.map.name === l.map.name).length < this.options.allowedSameMapEntries); const prevmapfilt = this.layerfilterPrevMaps(samemapfilt);