Fixed run.js

Will now create dbKeys
This commit is contained in:
Sam Nicholls 2012-12-17 19:30:50 +00:00
parent d0c47d18eb
commit 198fe9992d

2
run.js
View File

@ -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<config.dbKeys;i++) {
for(var i=0;i<config.dbKeys.length;i++) {
if(!this.db.hasOwnProperty(config.dbKeys[i])) {
this.db[config.dbKeys[i]] = {};
}