3
0
mirror of https://github.com/reality/dbot.git synced 2024-11-24 04:49:25 +01:00

Actually save the database

Moved this.save() call to end of reloadModules so new keys are actually saved.
This commit is contained in:
Sam Nicholls 2012-12-17 19:37:33 +00:00
parent 198fe9992d
commit c9a7254921

2
run.js
View File

@ -122,7 +122,6 @@ DBot.prototype.reloadModules = function() {
this.commandMap = {}; // Map of which commands belong to which modules this.commandMap = {}; // Map of which commands belong to which modules
this.usage = {}; this.usage = {};
this.timers.clearTimers(); this.timers.clearTimers();
this.save();
try { try {
this.strings = JSON.parse(fs.readFileSync('strings.json', 'utf-8')); this.strings = JSON.parse(fs.readFileSync('strings.json', 'utf-8'));
@ -226,6 +225,7 @@ DBot.prototype.reloadModules = function() {
console.log('MODULE ERROR: ' + name + ' ' + err); console.log('MODULE ERROR: ' + name + ' ' + err);
} }
}.bind(this)); }.bind(this));
this.save();
}; };
DBot.prototype.cleanNick = function(key) { DBot.prototype.cleanNick = function(key) {