cleaner way to check the blacklist

This commit is contained in:
Elijah R 2024-06-23 19:59:29 -04:00
parent 7632d84510
commit ed7c6eeec5

View file

@ -379,12 +379,10 @@ class HelperBot extends CollabVMClient {
let arg = message.slice(message.indexOf(" ") + 1); let arg = message.slice(message.indexOf(" ") + 1);
let ext = arg.slice(arg.lastIndexOf(".") + 1); let ext = arg.slice(arg.lastIndexOf(".") + 1);
if (arg.indexOf("..") !== -1) return; if (arg.indexOf("..") !== -1) return;
for (var ii = 0; ii < config.BANNED_ISO.length; ii++) { if (config.BANNED_ISO.some((b) => b.test(arg))) {
if (config.BANNED_ISO[ii].test(arg)) {
this.Chat("That ISO is currently blacklisted."); this.Chat("That ISO is currently blacklisted.");
return; return;
} }
}
switch (command) { switch (command) {
case "cd": case "cd":