forked from GitHub/dbot
inform banee that they got banned in pm [Close #493]
This commit is contained in:
parent
0421316002
commit
cab231b647
@ -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
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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}.\"",
|
||||
|
Loading…
Reference in New Issue
Block a user