mirror of
https://github.com/reality/dbot.git
synced 2024-11-27 22:39:26 +01:00
Merge github.com:reality/depressionbot into underscore
This commit is contained in:
commit
2004a70b45
@ -99,9 +99,17 @@ var admin = function(dbot) {
|
|||||||
// Load new module
|
// Load new module
|
||||||
'load': function(event) {
|
'load': function(event) {
|
||||||
var moduleName = event.params[1];
|
var moduleName = event.params[1];
|
||||||
|
if(!dbot.config.moduleNames.include(moduleName)) {
|
||||||
dbot.config.moduleNames.push(moduleName);
|
dbot.config.moduleNames.push(moduleName);
|
||||||
dbot.reloadModules();
|
dbot.reloadModules();
|
||||||
event.reply(dbot.t('load_module', {'moduleName': moduleName}));
|
event.reply(dbot.t('load_module', {'moduleName': moduleName}));
|
||||||
|
} else {
|
||||||
|
if(moduleName == 'web') {
|
||||||
|
event.reply(dbot.t('already_loaded_web'));
|
||||||
|
} else {
|
||||||
|
event.reply(dbot.t('already_loaded', {'moduleName': moduleName}));
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// Unload a loaded module
|
// Unload a loaded module
|
||||||
|
@ -70,5 +70,11 @@
|
|||||||
},
|
},
|
||||||
"not_in_channel": {
|
"not_in_channel": {
|
||||||
"english": "I'm not in {channel}"
|
"english": "I'm not in {channel}"
|
||||||
|
},
|
||||||
|
"already_loaded_web": {
|
||||||
|
"english": "WHY CAN'T I LOAD ALL THIS WEB? (web already loaded)"
|
||||||
|
},
|
||||||
|
"already_loaded": {
|
||||||
|
"english": "{moduleName} is already loaded."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user