3
0
mirror of https://github.com/reality/dbot.git synced 2024-11-24 04:49:25 +01:00

command can stand being run without quotes!

This commit is contained in:
reality 2013-01-14 16:47:48 +00:00
parent 5419a664dc
commit 0ff2a43c07

View File

@ -16,9 +16,13 @@ var command = function(dbot) {
this.listener = function(event) { this.listener = function(event) {
var commandName = event.params[0]; var commandName = event.params[0];
if(!_.has(dbot.commands, commandName)) { if(!_.has(dbot.commands, commandName)) {
commandName = '~'; if(_.has(dbot.modules, 'quotes')) {
} commandName = '~';
} else {
return;
}
}
if(this.api.isBanned(event.user, commandName)) { if(this.api.isBanned(event.user, commandName)) {
event.reply(dbot.t('command_ban', {'user': event.user})); event.reply(dbot.t('command_ban', {'user': event.user}));
} else { } else {