forked from GitHub/dbot
dont store bans in quotes, store ban records [#557]
This commit is contained in:
parent
239e94fe05
commit
5233481992
@ -1,4 +1,5 @@
|
|||||||
var _ = require('underscore')._;
|
var _ = require('underscore')._,
|
||||||
|
uuid = require('node-uuid');
|
||||||
|
|
||||||
var commands = function(dbot) {
|
var commands = function(dbot) {
|
||||||
var commands = {
|
var commands = {
|
||||||
@ -168,10 +169,18 @@ var commands = function(dbot) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Add qutoe category documenting ban
|
// Add qutoe category documenting ban
|
||||||
if(this.config.document_bans && _.has(dbot.modules, 'quotes')) {
|
if(this.config.document_bans) {
|
||||||
dbot.api.quotes.addQuote('ban_' + banee.toLowerCase(),
|
var id = uuid.v4();
|
||||||
quoteString, banee, function() {});
|
var banRecord = {
|
||||||
notifyString += ' ' + dbot.t('quote_recorded', { 'user': banee });
|
'id': id,
|
||||||
|
'time': new Date().getTime(),
|
||||||
|
'server': server,
|
||||||
|
'banee': banee,
|
||||||
|
'banner': banner,
|
||||||
|
'host': host,
|
||||||
|
'reason': reason
|
||||||
|
};
|
||||||
|
this.db.save('nbans', id, banRecord, function() {});
|
||||||
}
|
}
|
||||||
|
|
||||||
// Notify moderators, banee
|
// Notify moderators, banee
|
||||||
|
@ -7,5 +7,6 @@
|
|||||||
"aberwiki": "OAOSIDL"
|
"aberwiki": "OAOSIDL"
|
||||||
},
|
},
|
||||||
"chanserv": "ChanServ",
|
"chanserv": "ChanServ",
|
||||||
"document_bans": false
|
"document_bans": false,
|
||||||
|
"dbType": "redis"
|
||||||
}
|
}
|
||||||
|
@ -79,13 +79,6 @@
|
|||||||
"fr": "Vous avez été banni du réseau {network} par {banner}. La raison donnée était \"{reason}.\" Vous pouvez rejoindre {admin_channel} pour plus d'information or pour discuter du ban.",
|
"fr": "Vous avez été banni du réseau {network} par {banner}. La raison donnée était \"{reason}.\" Vous pouvez rejoindre {admin_channel} pour plus d'information or pour discuter du ban.",
|
||||||
"it": "Sei stato bandito dalla rete {network} da {banner}. Motivo: \"{reason}.\" Puoi ricongiungere {admin_channel} per ulteriori informazioni o discutere sulla messa al bando."
|
"it": "Sei stato bandito dalla rete {network} da {banner}. Motivo: \"{reason}.\" Puoi ricongiungere {admin_channel} per ulteriori informazioni o discutere sulla messa al bando."
|
||||||
},
|
},
|
||||||
"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}.\"",
|
|
||||||
"de": "{banee} wurde von {banner} auf dem gesamten Netzwerk um {time} gebannt. Grund: \"{reason}.\"",
|
|
||||||
"fr": "{banee} a été banni du réseau par {banner} à {time}. Raison donnée : \"{reason}.\"",
|
|
||||||
"it": "{banee} è stato bandito dalla rete da {banner} a {time}. Motivo : \"{reason}.\""
|
|
||||||
},
|
|
||||||
"no_user": {
|
"no_user": {
|
||||||
"en": "{user} doesn't seem to be online on this server.",
|
"en": "{user} doesn't seem to be online on this server.",
|
||||||
"fr": "{user} ne semble pas être connecté à ce serveur.",
|
"fr": "{user} ne semble pas être connecté à ce serveur.",
|
||||||
@ -105,12 +98,5 @@
|
|||||||
"en": "It appears {unbanee} was not banned using the ~nban command.",
|
"en": "It appears {unbanee} was not banned using the ~nban command.",
|
||||||
"fr": "Il semble que {unbanee} n'a pas été banni en utilisant la commande ~nban.",
|
"fr": "Il semble que {unbanee} n'a pas été banni en utilisant la commande ~nban.",
|
||||||
"it": "Sembar che {unbanee} non è stato bandito usano il commando ~nban."
|
"it": "Sembar che {unbanee} non è stato bandito usano il commando ~nban."
|
||||||
},
|
|
||||||
"quote_recorded": {
|
|
||||||
"en": "This has been recorded in ~ban_{user}.",
|
|
||||||
"cy": "Mae hyn wedi cael ei gofnodi yn ~ban_{user}.",
|
|
||||||
"de": "Dies wurde in ~ban_{user} aufgenommen.",
|
|
||||||
"fr": "Cela a été enregistré dans ~ban_{user}.",
|
|
||||||
"it": "Questo è stato registrato in ~ban_{user}."
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user