diff --git a/modules/kick/commands.js b/modules/kick/commands.js index 63adc6d..9879319 100644 --- a/modules/kick/commands.js +++ b/modules/kick/commands.js @@ -45,7 +45,7 @@ var commands = function(dbot) { banner = event.user, banee = event.input[1], reason = event.input[2], - adminChannel = this.config.admin_channels[event.server]; + adminChannel = this.config.admin_channel[event.server]; channels = dbot.config.servers[server].channels; var notifyString = dbot.t('nbanned', { @@ -68,11 +68,21 @@ var commands = function(dbot) { } // Notify moderators, banee - if(this.config.admin_channels[event.server]) { - notifyChannel = this.config.admin_channels[event.server]; - channels = _.without(channels, notifyChannel); + if(adminChannel) { + channels = _.without(channels, adminChannel); + dbot.api.report.notify(server, adminChannel, notifyString); dbot.say(event.server, adminChannel, notifyString); + + var network = this.config.network_name[event.server]; + if(!network) network = event.server; + + dbot.say(event.server, banee, dbot.t('nbanned_notify', { + 'network': network, + 'banner': banner, + 'reason': reason, + 'admin_channel': adminChannel + })); } // Ban the user from all channels diff --git a/modules/kick/config.json b/modules/kick/config.json index bf4cd1d..be5bdda 100644 --- a/modules/kick/config.json +++ b/modules/kick/config.json @@ -4,9 +4,12 @@ "help": "http://github.com/reality/depressionbot/blob/master/modules/kick/README.md", "ignorable": true, "countSilently": true, - "admin_channels": { + "admin_channel": { "aberwiki": "#fishbox" }, + "network_name": { + "aberwiki": "OAOSIDL" + }, "chanserv": "ChanServ", "document_bans": false } diff --git a/modules/kick/strings.json b/modules/kick/strings.json index 4d0081f..e73514b 100644 --- a/modules/kick/strings.json +++ b/modules/kick/strings.json @@ -30,6 +30,9 @@ "cy": "Sylw: {banner} wedi gwahardd {banee} ledled y rhwydwaith. Y rheswm a roddwyd oedd: \"{reason}.\"", "de": "Achtung: {banner} hat {banee} auf dem gesamten Netzwerk gebannt. Grund: \"{reason}.\"" }, + "nbanned_notify": { + "en": "You have been banned from the {network} network by {banner}. The reason given was \"{reason}.\" You can join {admin_channel} for more information or to discuss the ban." + }, "nban_quote": { "en": "{banee} was banned from the network by {banner} on {time}. The reason given was \"{reason}.\"", "cy": "Cafodd {banee} ei wahardd o'r rhwydwaith gan {banner} ar {time}. Y rheswm a roddwyd oedd: \"{reason}.\"",