cleaner way to check the blacklist
This commit is contained in:
parent
7632d84510
commit
ed7c6eeec5
1 changed files with 3 additions and 5 deletions
|
@ -379,12 +379,10 @@ 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)) {
|
||||
if (config.BANNED_ISO.some((b) => b.test(arg))) {
|
||||
this.Chat("That ISO is currently blacklisted.");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
switch (command) {
|
||||
case "cd":
|
||||
|
|
Loading…
Reference in a new issue