3
0
mirror of https://github.com/reality/dbot.git synced 2024-12-24 11:42:36 +01:00

coloiurs and format change for ~report

This commit is contained in:
reality 2013-08-21 21:10:06 +00:00
parent 91d6f64520
commit 1ff9718039
2 changed files with 21 additions and 4 deletions

View File

@ -93,10 +93,27 @@ var report = function(dbot) {
dbot.api.users.resolveUser(event.server, nick, function(reportee) {
if(_.has(event.allChannels, channelName)) {
if(reportee) {
var notifier = '[' + event.user + ']',
cChan = channelName,
type = 'report',
reporter = event.user;
if(_.has(this.config.colours, event.server)) {
var colours = this.config.colours[event.server];
reporter = colours['nicks'] + reporter + '\u000f';
nick = colours['nicks'] + nick + '\u000f';
type = colours['type'][type] + type + '\u000f';
if(_.has(colours['channels'], channelName)) {
cChan = colours['channels'][channelName] +
cChan + "\u000f";
}
}
this.api.notify(event.server, channelName, dbot.t('report', {
'reporter': event.user,
'type': type,
'reporter': reporter,
'reported': nick,
'channel': channelName,
'channel': cChan,
'reason': reason
}));
event.reply(dbot.t('reported', { 'reported': nick }));
@ -134,7 +151,7 @@ var report = function(dbot) {
var colours = this.config.colours[event.server];
notifier = '[' + colours['nicks'] + event.user + '\u000f]';
type = colours['type'] + type + '\u000f';
type = colours['type'][type] + type + '\u000f';
if(_.has(colours['channels'], channelName)) {
cChan = colours['channels'][channelName] +
cChan + "\u000f";

View File

@ -1,6 +1,6 @@
{
"report": {
"en": "Attention: {reporter} has reported {reported} in {channel}. The reason given was: \"{reason}\"",
"en": "[{type}][{channel}][{reporter} -> {reported}] \"{reason}\"",
"na'vi": "{reporter}ìl fpìl futa {reported} fe' lu taluna {reason}.",
"cy": "Sylw! {reporter} wedi adrodd {reported} yn {channel}. Y rheswm a rhoddwyd oedd: \"{reason}\"",
"nl": "Waarschuwing: {reporter} heeft {reported} aangegeven in {channel}. De reden die gegeven werd was: \"{reason}\"",