Disable command config [#126] Disabled ~js (good example for [#125])

This commit is contained in:
reality 2013-01-12 10:12:56 +00:00
parent 20ef3b6432
commit 400169f9ee
2 changed files with 8 additions and 1 deletions

View File

@ -124,7 +124,9 @@ var command = function(dbot) {
if(isBanned(event.user, commandName)) { if(isBanned(event.user, commandName)) {
event.reply(dbot.t('command_ban', {'user': event.user})); event.reply(dbot.t('command_ban', {'user': event.user}));
} else { } 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)) { if(applyRegex(commandName, event)) {
try { try {
dbot.commands[commandName](event); dbot.commands[commandName](event);

View File

@ -1,3 +1,8 @@
{ {
"commands": {
"~js": {
"disabled": true
}
},
"help": "http://github.com/reality/depressionbot/blob/master/modules/js/README.md" "help": "http://github.com/reality/depressionbot/blob/master/modules/js/README.md"
} }