forked from GitHub/dbot
quietbans
This commit is contained in:
parent
bf920874b1
commit
29bdb0e91e
@ -23,7 +23,11 @@ var commands = function(dbot) {
|
||||
var vStatus = dbot.instance.connections[server].channels[channel].nicks[quietee].voice;
|
||||
dbot.api.timers.addTimeout(msTimeout, function() {
|
||||
if(_.has(this.hosts[server], quietee)) {
|
||||
if(_.include(this.config.quietBans, channel)) {
|
||||
this.api.unban(server, this.hosts[server][quietee], channel);
|
||||
} else {
|
||||
this.api.unquiet(server, this.hosts[server][quietee], channel);
|
||||
}
|
||||
if(vStatus === true) {
|
||||
this.api.voice(server, quietee, channel);
|
||||
}
|
||||
@ -62,7 +66,12 @@ var commands = function(dbot) {
|
||||
if(dbot.instance.connections[server].channels[channel].nicks[quietee].voice === true) {
|
||||
this.api.devoice(server, quietee, channel);
|
||||
}
|
||||
|
||||
if(_.include(this.config.quietBans, channel)) {
|
||||
this.api.ban(server, this.hosts[server][quietee], channel);
|
||||
} else {
|
||||
this.api.quiet(server, host, channel);
|
||||
}
|
||||
|
||||
if(reason.indexOf('#warn') !== -1) {
|
||||
dbot.api.warning.warn(server, event.rUser, quietee,
|
||||
|
@ -3,6 +3,9 @@
|
||||
"dependencies": [ "command", "report", "users" ],
|
||||
"ignorable": true,
|
||||
"countSilently": true,
|
||||
"quietBans": [
|
||||
"#wherever"
|
||||
],
|
||||
"network_name": {
|
||||
"aberwiki": "OAOSIDL"
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user