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.modules = {};
|
||||||
this.commands = {};
|
this.commands = {};
|
||||||
this.api = {};
|
this.api = {};
|
||||||
<<<<<<< HEAD
|
|
||||||
=======
|
|
||||||
this.stringMap = {};
|
this.stringMap = {};
|
||||||
>>>>>>> 36d40f65a309f6911bae95bf0428d332c32a496a
|
|
||||||
this.usage = {};
|
this.usage = {};
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@ -221,7 +218,6 @@ DBot.prototype.reloadModules = function() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
process.nextTick(function() {
|
process.nextTick(function() {
|
||||||
_.each(moduleNames, function(name) {
|
_.each(moduleNames, function(name) {
|
||||||
try {
|
try {
|
||||||
@ -235,21 +231,6 @@ DBot.prototype.reloadModules = function() {
|
|||||||
console.log('Error loading module: ' + err + ' ' + stack);
|
console.log('Error loading module: ' + err + ' ' + stack);
|
||||||
return;
|
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.name = name;
|
||||||
module.db = this.ddb.databanks[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'));
|
propertyData = JSON.parse(fs.readFileSync(moduleDir + property + '.json', 'utf-8'));
|
||||||
} catch(err) {};
|
} catch(err) {};
|
||||||
_.extend(this[property], propertyData);
|
_.extend(this[property], propertyData);
|
||||||
|
if(property == 'strings') {
|
||||||
|
_.each(_.keys(propertyData), function(string) {
|
||||||
|
this.stringMap[string] = name;
|
||||||
|
}.bind(this));
|
||||||
|
}
|
||||||
}, this);
|
}, this);
|
||||||
|
|
||||||
// Provide toString for module name
|
// Provide toString for module name
|
||||||
|
Loading…
Reference in New Issue
Block a user