forked from GitHub/dbot
fix merge properly
This commit is contained in:
parent
eb4e788b5c
commit
a446999285
24
run.js
24
run.js
@ -136,10 +136,7 @@ DBot.prototype.reloadModules = function() {
|
||||
this.modules = {};
|
||||
this.commands = {};
|
||||
this.api = {};
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
this.stringMap = {};
|
||||
>>>>>>> 36d40f65a309f6911bae95bf0428d332c32a496a
|
||||
this.usage = {};
|
||||
|
||||
try {
|
||||
@ -221,7 +218,6 @@ DBot.prototype.reloadModules = function() {
|
||||
}
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
process.nextTick(function() {
|
||||
_.each(moduleNames, function(name) {
|
||||
try {
|
||||
@ -235,21 +231,6 @@ DBot.prototype.reloadModules = function() {
|
||||
console.log('Error loading module: ' + err + ' ' + stack);
|
||||
return;
|
||||
}
|
||||
=======
|
||||
// Load string data for the module
|
||||
_.each([ 'usage', 'strings' ], function(property) {
|
||||
var propertyData = {};
|
||||
try {
|
||||
propertyData = JSON.parse(fs.readFileSync(moduleDir + property + '.json', 'utf-8'));
|
||||
} catch(err) {};
|
||||
_.extend(this[property], propertyData);
|
||||
if(property == 'strings') {
|
||||
_.each(_.keys(propertyData), function(string) {
|
||||
this.stringMap[string] = name;
|
||||
}.bind(this));
|
||||
}
|
||||
}, this);
|
||||
>>>>>>> 36d40f65a309f6911bae95bf0428d332c32a496a
|
||||
|
||||
module.name = name;
|
||||
module.db = this.ddb.databanks[name];
|
||||
@ -307,6 +288,11 @@ DBot.prototype.reloadModules = function() {
|
||||
propertyData = JSON.parse(fs.readFileSync(moduleDir + property + '.json', 'utf-8'));
|
||||
} catch(err) {};
|
||||
_.extend(this[property], propertyData);
|
||||
if(property == 'strings') {
|
||||
_.each(_.keys(propertyData), function(string) {
|
||||
this.stringMap[string] = name;
|
||||
}.bind(this));
|
||||
}
|
||||
}, this);
|
||||
|
||||
// Provide toString for module name
|
||||
|
Loading…
Reference in New Issue
Block a user