diff --git a/modules/report/report.js b/modules/report/report.js index e55377a..4a8d8ff 100644 --- a/modules/report/report.js +++ b/modules/report/report.js @@ -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"; diff --git a/modules/report/strings.json b/modules/report/strings.json index cf59805..2b29a27 100644 --- a/modules/report/strings.json +++ b/modules/report/strings.json @@ -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}\"",