forked from GitHub/dbot
banOutput option in command [#460]
This commit is contained in:
parent
e1ea156a41
commit
429eafd8e4
@ -24,7 +24,9 @@ var command = function(dbot) {
|
|||||||
dbot.api.ignore.isUserIgnoring(event.server, event.user, commandName, function(isIgnoring) {
|
dbot.api.ignore.isUserIgnoring(event.server, event.user, commandName, function(isIgnoring) {
|
||||||
dbot.api.ignore.isUserBanned(event.server, event.user, commandName, function(isBanned) {
|
dbot.api.ignore.isUserBanned(event.server, event.user, commandName, function(isBanned) {
|
||||||
if(isBanned) {
|
if(isBanned) {
|
||||||
|
if(this.config.banOutput === true && commandName != '~') {
|
||||||
event.reply(dbot.t('command_ban', {'user': event.user}));
|
event.reply(dbot.t('command_ban', {'user': event.user}));
|
||||||
|
}
|
||||||
} else if(!hasAccess) {
|
} else if(!hasAccess) {
|
||||||
if(this.config.accessOutput) {
|
if(this.config.accessOutput) {
|
||||||
event.reply(dbot.t('access_denied', { 'user': event.user }));
|
event.reply(dbot.t('access_denied', { 'user': event.user }));
|
||||||
|
@ -2,5 +2,6 @@
|
|||||||
"ignorable": false,
|
"ignorable": false,
|
||||||
"dependencies": [ "event", "ignore", "users" ],
|
"dependencies": [ "event", "ignore", "users" ],
|
||||||
"useNickserv": false,
|
"useNickserv": false,
|
||||||
"accessOutput": false
|
"accessOutput": false,
|
||||||
|
"banOutput": false
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user