From 2f2356f2fd7938a09b0292f30fbc56085f592d4e Mon Sep 17 00:00:00 2001 From: reality Date: Mon, 21 Jan 2013 20:50:23 +0000 Subject: [PATCH] Add dependency info [#187] --- modules/admin/config.json | 1 + modules/dent/config.json | 1 + modules/dent/dent.js | 2 +- modules/dice/config.json | 3 ++- modules/ignore/config.json | 1 + modules/js/config.json | 1 + modules/kick/config.json | 1 + modules/link/config.json | 1 + modules/quotes/commands.js | 2 +- modules/quotes/config.json | 1 + modules/report/config.json | 1 + 11 files changed, 12 insertions(+), 3 deletions(-) diff --git a/modules/admin/config.json b/modules/admin/config.json index dd2edcb..009fb85 100644 --- a/modules/admin/config.json +++ b/modules/admin/config.json @@ -1,5 +1,6 @@ { "ignorable": false, "dbKeys": [ "bans" ], + "dependencies": [ "command" ], "help": "http://github.com/reality/depressionbot/blob/master/modules/admin/README.md" } diff --git a/modules/dent/config.json b/modules/dent/config.json index 527dc55..4a48ea8 100644 --- a/modules/dent/config.json +++ b/modules/dent/config.json @@ -1,6 +1,7 @@ { "username": "youruserhere", "password": "yourpasswordhere", + "dependencies": [ "command" ], "ignorable": true, "dentQuotes": false } diff --git a/modules/dent/dent.js b/modules/dent/dent.js index 4e3b425..8ee57e0 100644 --- a/modules/dent/dent.js +++ b/modules/dent/dent.js @@ -34,7 +34,7 @@ var dent = function(dbot) { this.commands['~dent'].regex = [/^~dent (.+)$/, 2]; this.onLoad = function() { - if(dbot.config.dent.dentQuotes === true) { + if(dbot.config.dent.dentQuotes === true && _.has(dbot.modules, 'quotes')) { dbot.api.command.addHook('~qadd', function(key, text) { this.api.post(key + ': ' + text); }.bind(this)); diff --git a/modules/dice/config.json b/modules/dice/config.json index c945e96..3f82d9c 100644 --- a/modules/dice/config.json +++ b/modules/dice/config.json @@ -1,3 +1,4 @@ { - "ignorable": true + "ignorable": true, + "dependencies": [ "command" ] } diff --git a/modules/ignore/config.json b/modules/ignore/config.json index ef29f33..fa1961a 100644 --- a/modules/ignore/config.json +++ b/modules/ignore/config.json @@ -1,5 +1,6 @@ { "ignorable": false, + "dependencies": [ "command" ], "dbKeys": [ "ignores" ], "help": "http://github.com/reality/depressionbot/blob/master/modules/ignore/README.md" } diff --git a/modules/js/config.json b/modules/js/config.json index a6df84c..084df95 100644 --- a/modules/js/config.json +++ b/modules/js/config.json @@ -4,6 +4,7 @@ "disabled": true } }, + "dependencies": [ "command" ], "ignorable": true, "help": "http://github.com/reality/depressionbot/blob/master/modules/js/README.md" } diff --git a/modules/kick/config.json b/modules/kick/config.json index b73069a..558129d 100644 --- a/modules/kick/config.json +++ b/modules/kick/config.json @@ -1,5 +1,6 @@ { "dbKeys": [ "kicks", "kickers" ], + "dependencies": [ "command" ], "help": "http://github.com/reality/depressionbot/blob/master/modules/kick/README.md", "ignorable": true } diff --git a/modules/link/config.json b/modules/link/config.json index ef7d7ff..9c3dc3e 100644 --- a/modules/link/config.json +++ b/modules/link/config.json @@ -1,5 +1,6 @@ { "autoTitle": false, + "dependencies": [ "command" ], "ignorable": true, "help": "http://github.com/reality/depressionbot/blob/master/modules/link/README.md" } diff --git a/modules/quotes/commands.js b/modules/quotes/commands.js index 824dcb5..c9a54f4 100644 --- a/modules/quotes/commands.js +++ b/modules/quotes/commands.js @@ -103,7 +103,7 @@ var commands = function(dbot) { var key = event.input[1].trim().toLowerCase(); if(_.has(quotes, key)) { var quote = quotes[key].pop(); - if(quotes[key].length === 0) { + if(quotes[key].length == 0) { delete quotes[key]; } this.internalAPI.resetRemoveTimer(event, key, quote); diff --git a/modules/quotes/config.json b/modules/quotes/config.json index cc5526a..4318f50 100644 --- a/modules/quotes/config.json +++ b/modules/quotes/config.json @@ -1,5 +1,6 @@ { "dbKeys": [ "quoteArrs" ], + "dependencies": [ "command" ] "rmLimit": 10, "ignorable": true, "help": "http://github.com/reality/depressionbot/blob/master/modules/quotes/README.md" diff --git a/modules/report/config.json b/modules/report/config.json index 831c099..424160e 100644 --- a/modules/report/config.json +++ b/modules/report/config.json @@ -1,4 +1,5 @@ { "ignorable": true, + "dependencies": [ "command", "users" ], "help": "http://github.com/reality/depressionbot/blob/master/modules/report/README.md" }