diff --git a/modules/report/report.js b/modules/report/report.js index bf270c0..cc7d0fb 100644 --- a/modules/report/report.js +++ b/modules/report/report.js @@ -127,23 +127,24 @@ var report = function(dbot) { 'message': message }, function() {}); - var notifier = event.user, + var notifier = '[' + event.user + ']', cChan = channelName, type = 'notify'; if(_.has(this.config.colours, event.server)) { var colours = this.config.colours[event.server]; - notifier = colours['nicks'] + notifier + '\u000f'; + notifier = '[' + colours['nicks'] + event.user + '\u000f]'; type = colours['type'] + type + '\u000f'; if(_.has(colours['channels'], channelName)) { cChan = colours['channels'][channelName] + cChan + "\u000f"; } - _.each(message.match(/ @([\d\w\s*|-]+?)( |$)/g), function(user) { - notifier += '[' + colours['nicks'] + user.replace(/ @/, "") + '\u000f]'; + _.each(message.match(/@([\d\w\s*|-]+?)( |$)/g), function(user) { + user = user.replace(/@([\d\w\s*|-]+?)( |$)/, "$1"); + notifier += '[' + colours['nicks'] + user + '\u000f]'; }); - message = message.replace(/ @([\d\w\s*|-]+?)( |$)/g, " " + colours['nicks'] + + message = message.replace(/@([\d\w\s*|-]+?)( |$)/g, colours['nicks'] + "@$1\u000f "); } diff --git a/modules/report/strings.json b/modules/report/strings.json index 935bd0b..cf59805 100644 --- a/modules/report/strings.json +++ b/modules/report/strings.json @@ -45,9 +45,9 @@ "it": "Non sono presente in {channel}." }, "notify": { - "en": "[{type}][{channel}][{notifier}] {message}", - "fr": "[{type}][{channel}][{notifier}] {message}", - "it": "[{type}][{channel}][{notifier}] {message}" + "en": "[{type}][{channel}]{notifier} {message}", + "fr": "[{type}][{channel}]{notifier} {message}", + "it": "[{type}][{channel}]{notifier} {message}" }, "notified": { "en": "{user}: {channel} staff notified.",