From 269588c6f7439fc673a9cfdd24efdbd188259d48 Mon Sep 17 00:00:00 2001 From: Davide Fantino <80767709+fantinodavide@users.noreply.github.com> Date: Tue, 7 Feb 2023 01:07:20 +0100 Subject: [PATCH] fix: blacklist with custom votes --- mapvote.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mapvote.js b/mapvote.js index 12e87fd..32d126b 100644 --- a/mapvote.js +++ b/mapvote.js @@ -588,8 +588,8 @@ export default class MapVote extends DiscordBasePlugin { (cls[ 0 ] == "*" || l.layerid.toLowerCase().startsWith(cls[ 0 ])) && (l.gamemode.toLowerCase().startsWith(cls[ 1 ]) || (!cls[ 1 ] && this.options.gamemodeWhitelist.includes(l.gamemode.toUpperCase()))) && (!cls[ 2 ] || l.version.toLowerCase().startsWith("v" + cls[ 2 ].replace(/v/gi, ''))) - && !(this.options.factionsBlacklist.find((f) => [ getTranslation(l.teams[ 0 ]), getTranslation(l.teams[ 1 ]) ].includes(f))) - && (!cls[ 3 ] || !( + // && !(this.options.factionsBlacklist.find((f) => [ getTranslation(l.teams[ 0 ]), getTranslation(l.teams[ 1 ]) ].includes(f))) + && (cls[ 2 ] || !( this.options.layerLevelBlacklist.find((fl) => this.getLayersFromStringId(fl).map((e) => e.layerid).includes(l.layerid)) || this.options.factionsBlacklist.find((f) => [ getTranslation(l.teams[ 0 ]), getTranslation(l.teams[ 1 ]) ].includes(f)) ))