From 65b410416cbd897aa74c2b5bc87e4eb2a3d3a4f5 Mon Sep 17 00:00:00 2001 From: reality Date: Sun, 21 Apr 2013 14:51:59 +0000 Subject: [PATCH] Module loader properly iterates all automatically loaded dependencies [#399] --- modules/command/config.json | 2 +- run.js | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/modules/command/config.json b/modules/command/config.json index bace93b..6395f6d 100644 --- a/modules/command/config.json +++ b/modules/command/config.json @@ -1,5 +1,5 @@ { "ignorable": false, "help": "http://github.com/reality/depressionbot/blob/master/modules/command/README.md", - "dbKeys": [ "ignores", "bans" ] + "dbKeys": [ "ignores", "bans", "users" ] } diff --git a/run.js b/run.js index 2568e96..b6297b0 100644 --- a/run.js +++ b/run.js @@ -153,9 +153,13 @@ DBot.prototype.reloadModules = function() { require('./snippets'); this.instance.removeListeners(); - _.each(moduleNames, function(name) { + + var name, moduleDir, config; + for(i=0;i