From 400169f9eea6b8a5c64dbb0215ef2b5c3d1e0158 Mon Sep 17 00:00:00 2001 From: reality Date: Sat, 12 Jan 2013 10:12:56 +0000 Subject: [PATCH] Disable command config [#126] Disabled ~js (good example for [#125]) --- modules/command/command.js | 4 +++- modules/js/config.json | 5 +++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/modules/command/command.js b/modules/command/command.js index 51d991b..6373055 100644 --- a/modules/command/command.js +++ b/modules/command/command.js @@ -124,7 +124,9 @@ var command = function(dbot) { if(isBanned(event.user, commandName)) { event.reply(dbot.t('command_ban', {'user': event.user})); } else { - if(!isIgnoring(event.user, commandName) && hasAccess(event.user, commandName)) { + if(!isIgnoring(event.user, commandName) && + hasAccess(event.user, commandName) && + dbot.commands[commandName].disabled !== true) { if(applyRegex(commandName, event)) { try { dbot.commands[commandName](event); diff --git a/modules/js/config.json b/modules/js/config.json index deddf40..70bf0ec 100644 --- a/modules/js/config.json +++ b/modules/js/config.json @@ -1,3 +1,8 @@ { + "commands": { + "~js": { + "disabled": true + } + }, "help": "http://github.com/reality/depressionbot/blob/master/modules/js/README.md" }