From c9a7254921594b706c27db93f78ac74c14f6e9b1 Mon Sep 17 00:00:00 2001 From: Sam Nicholls Date: Mon, 17 Dec 2012 19:37:33 +0000 Subject: [PATCH] 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) {