bug fix nominations cmdlet fillin

This commit is contained in:
Skillet 2023-05-22 21:54:25 -04:00
parent e29358ab3b
commit a1e4badf4b

View File

@ -621,7 +621,7 @@ export default class MapVote extends DiscordBasePlugin {
if (isRandomVote) { if (isRandomVote) {
for (const gm of Object.keys(this.options.minGamemodeEntries)) { for (const gm of Object.keys(this.options.minGamemodeEntries)) {
for (let i = 0; i < +this.options.minGamemodeEntries[gm] && cmdLayers.length < optionAmount; i++) for (let i = 0; i < +this.options.minGamemodeEntries[gm] && cmdLayers.length < optionAmount; i++)
cmdLayers.push(`*_${gm}`); cmdLayers.push(`*_*_${gm}`);
} }
while (cmdLayers.length < optionAmount) while (cmdLayers.length < optionAmount)
cmdLayers.push(`*`); cmdLayers.push(`*`);
@ -633,6 +633,7 @@ export default class MapVote extends DiscordBasePlugin {
if (cmdLayers.length <= maxOptions) { if (cmdLayers.length <= maxOptions) {
let i = 1; let i = 1;
this.verbose(1, "cmdLayers: " + cmdLayers.join(", "));
for (const cl of cmdLayers) { for (const cl of cmdLayers) {
const cls = cl.toLowerCase().split('_'); //cls[0] = mod, cls[1] = map, cls[2] = gamemode, cls[3] = version, cls[4] = faction const cls = cl.toLowerCase().split('_'); //cls[0] = mod, cls[1] = map, cls[2] = gamemode, cls[3] = version, cls[4] = faction
const whitefilt = this.layerfilterWlist(sanitizedLayers); const whitefilt = this.layerfilterWlist(sanitizedLayers);