forked from GitHub/dbot
option to notify voiced users with ~report [Close #348]
This commit is contained in:
parent
74328ada86
commit
3a33c2be04
@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
"ignorable": true,
|
"ignorable": true,
|
||||||
|
"notifyVoice": false,
|
||||||
"dependencies": [ "command", "users" ],
|
"dependencies": [ "command", "users" ],
|
||||||
"help": "http://github.com/reality/depressionbot/blob/master/modules/report/README.md"
|
"help": "http://github.com/reality/depressionbot/blob/master/modules/report/README.md"
|
||||||
}
|
}
|
||||||
|
@ -12,8 +12,12 @@ var report = function(dbot) {
|
|||||||
if(dbot.api.users.isChannelUser(event.server, nick, channelName, true)) {
|
if(dbot.api.users.isChannelUser(event.server, nick, channelName, true)) {
|
||||||
var nick = dbot.api.users.resolveUser(event.server, nick, true);
|
var nick = dbot.api.users.resolveUser(event.server, nick, true);
|
||||||
var ops = _.filter(channel.nicks, function(user) {
|
var ops = _.filter(channel.nicks, function(user) {
|
||||||
|
if(this.config.notifyVoice) {
|
||||||
|
return user.op || user.voice;
|
||||||
|
} else {
|
||||||
return user.op;
|
return user.op;
|
||||||
});
|
}
|
||||||
|
}, this);
|
||||||
|
|
||||||
_.each(ops, function(user) {
|
_.each(ops, function(user) {
|
||||||
dbot.say(event.server, user.name, dbot.t('report', {
|
dbot.say(event.server, user.name, dbot.t('report', {
|
||||||
|
Loading…
Reference in New Issue
Block a user