From 2ebbb6aa40daac9abe9c6343537c3f432c9bc9bf Mon Sep 17 00:00:00 2001 From: Skillet Date: Mon, 22 May 2023 20:52:19 -0400 Subject: [PATCH] change how nominations filtering works and how layer blacklist and whitelist are parsed --- mapvote.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mapvote.js b/mapvote.js index 6e683a4..715e7e1 100644 --- a/mapvote.js +++ b/mapvote.js @@ -864,7 +864,7 @@ export default class MapVote extends DiscordBasePlugin { getLayersFromStringId(stringid) { // const cls = stringid.toLowerCase().split('_'); const modLayers = this.layerfilterCorrectLayers(Layers.layers); - const ret = modLayers.filter(l => l.layerid.toLowerCase().contains(stringid.replace(/\*/gi,'').toLowerCase())); + const ret = modLayers.filter(l => l.layerid.toLowerCase().includes(stringid.replace(/\*/gi,'').toLowerCase())); // const ret = modLayers.filter((l) => ((cls[0] === "*" || l.layerid.toLowerCase().startsWith(cls[0])) && (l.gamemode.toLowerCase().startsWith(cls[1]) || (!cls[1] && ['RAAS', 'AAS', 'INVASION'].includes(l.gamemode.toUpperCase()))) && (!cls[2] || parseInt(l.version.toLowerCase().replace(/v/gi, '')) == parseInt(cls[2].replace(/v/gi, ''))))); // this.verbose(1,"layers from string",stringid,cls,ret) return ret;