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