diff --git a/index.js b/index.js index 3a086d8..83f71de 100644 --- a/index.js +++ b/index.js @@ -39,7 +39,7 @@ const main = async () => { // Search all forwards for any target that is between 700 and 800. If it exists, log to console and run `asterisk -x "database del CF[U/B] "` to delete it for (const [key, target] of Object.entries(forwards)) { const targetExt = parseInt(target, 10); - if (targetExt >= 700 && targetExt < 800) { + if ((targetExt >= 700 && targetExt < 800) || targetExt === 0) { // Also block forwards to 0 (operator line) console.log(`Deleting forward ${key} to target ${target}`); await hook.send(`Fuckass with extension ${key.split('/')[1]} tried to forward to ${target}. Forward has been deleted.`); const delCommand = `asterisk -x "database del ${key.replace('/', ' ')}"`;