diff --git a/modules/report/config.json b/modules/report/config.json index 424160e..c495082 100644 --- a/modules/report/config.json +++ b/modules/report/config.json @@ -1,5 +1,6 @@ { "ignorable": true, + "notifyVoice": false, "dependencies": [ "command", "users" ], "help": "http://github.com/reality/depressionbot/blob/master/modules/report/README.md" } diff --git a/modules/report/report.js b/modules/report/report.js index 2e9bbe9..89910ba 100644 --- a/modules/report/report.js +++ b/modules/report/report.js @@ -12,8 +12,12 @@ var report = function(dbot) { if(dbot.api.users.isChannelUser(event.server, nick, channelName, true)) { var nick = dbot.api.users.resolveUser(event.server, nick, true); var ops = _.filter(channel.nicks, function(user) { - return user.op; - }); + if(this.config.notifyVoice) { + return user.op || user.voice; + } else { + return user.op; + } + }, this); _.each(ops, function(user) { dbot.say(event.server, user.name, dbot.t('report', {