mirror of
https://github.com/reality/dbot.git
synced 2024-11-27 22:39:26 +01:00
ignorableModules now built with filter, module.toString returns name
This commit is contained in:
parent
85fc4d6e6f
commit
078c4cf3e3
@ -7,11 +7,9 @@
|
|||||||
var ignore = function(dbot) {
|
var ignore = function(dbot) {
|
||||||
var commands = {
|
var commands = {
|
||||||
'~ignore': function(event) {
|
'~ignore': function(event) {
|
||||||
var ignorableModules = [];
|
var ignorableModules = dbot.modules.filter(function(module) {
|
||||||
|
|
||||||
dbot.modules.each(function(module) {
|
|
||||||
if(module.ignorable != null && module.ignorable == true) {
|
if(module.ignorable != null && module.ignorable == true) {
|
||||||
ignorableModules.push(module.name);
|
return true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
var module = event.params[1];
|
var module = event.params[1];
|
||||||
|
3
run.js
3
run.js
@ -226,6 +226,9 @@ DBot.prototype.reloadModules = function() {
|
|||||||
// Invalid or no string info
|
// Invalid or no string info
|
||||||
}
|
}
|
||||||
|
|
||||||
|
module.toString = function() {
|
||||||
|
return this.name;
|
||||||
|
}
|
||||||
this.modules[module.name] = module;
|
this.modules[module.name] = module;
|
||||||
} catch(err) {
|
} catch(err) {
|
||||||
console.log(this.t('module_load_error', {'moduleName': name}));
|
console.log(this.t('module_load_error', {'moduleName': name}));
|
||||||
|
Loading…
Reference in New Issue
Block a user