From 198fe9992da18cf9de0be65b83300894784f8919 Mon Sep 17 00:00:00 2001 From: Sam Nicholls Date: Mon, 17 Dec 2012 19:30:50 +0000 Subject: [PATCH 1/3] Fixed run.js Will now create dbKeys --- run.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run.js b/run.js index fec9441..d3157f4 100644 --- a/run.js +++ b/run.js @@ -211,7 +211,7 @@ DBot.prototype.reloadModules = function() { try { var config = JSON.parse(fs.readFileSync(moduleDir + 'config.json', 'utf-8')) this.config[name] = config; - for(var i=0;i Date: Mon, 17 Dec 2012 19:37:33 +0000 Subject: [PATCH 2/3] Actually save the database Moved this.save() call to end of reloadModules so new keys are actually saved. --- run.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run.js b/run.js index d3157f4..8a1087d 100644 --- a/run.js +++ b/run.js @@ -122,7 +122,6 @@ DBot.prototype.reloadModules = function() { this.commandMap = {}; // Map of which commands belong to which modules this.usage = {}; this.timers.clearTimers(); - this.save(); try { this.strings = JSON.parse(fs.readFileSync('strings.json', 'utf-8')); @@ -226,6 +225,7 @@ DBot.prototype.reloadModules = function() { console.log('MODULE ERROR: ' + name + ' ' + err); } }.bind(this)); + this.save(); }; DBot.prototype.cleanNick = function(key) { From 0dc5c6d91f8317d82c898f403822889543e39184 Mon Sep 17 00:00:00 2001 From: Sam Nicholls Date: Mon, 17 Dec 2012 12:09:39 -0800 Subject: [PATCH 3/3] Ensure ignores dbKey exists Created dbKeys config for ignores module to prevent meltdown. --- modules/ignore/config.json | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 modules/ignore/config.json diff --git a/modules/ignore/config.json b/modules/ignore/config.json new file mode 100644 index 0000000..7a4c116 --- /dev/null +++ b/modules/ignore/config.json @@ -0,0 +1,3 @@ +{ + "dbKeys": [ "ignores" ] +}