From ea9d3ee0ff5e1a48c6266f2d08cfd77f55d68d13 Mon Sep 17 00:00:00 2001 From: reality Date: Sun, 28 Jul 2013 16:26:54 +0000 Subject: [PATCH] only append period if it doesnt already exist --- modules/report/report.js | 2 ++ modules/report/strings.json | 12 ++++++------ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/modules/report/report.js b/modules/report/report.js index b196147..2c71fd5 100644 --- a/modules/report/report.js +++ b/modules/report/report.js @@ -64,6 +64,8 @@ var report = function(dbot) { nick = event.input[2], reason = event.input[3]; + if(reason.charAt(reason.length - 1) != '.') reason += '.'; + dbot.api.users.resolveUser(event.server, nick, function(reportee) { if(_.has(event.allChannels, channelName)) { if(reportee) { diff --git a/modules/report/strings.json b/modules/report/strings.json index 585717f..888e9b9 100644 --- a/modules/report/strings.json +++ b/modules/report/strings.json @@ -1,12 +1,12 @@ { "report": { - "en": "Attention: {reporter} has reported {reported} in {channel}. The reason given was: \"{reason}.\"", + "en": "Attention: {reporter} has reported {reported} in {channel}. The reason given was: \"{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}.\"", - "de": "Achtung: {reporter} hat {reported} in {channel} gemeldet. Grund: \"{reason}.\"", - "fr": "Attention : {reporter} a reporté {reported} dans {channel}. Raison donnée : \"{reason}.\"", - "it": "Attentzone : {reporter} ha segnalato {reported} in {channel}. Motivo : \"{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}\"", + "de": "Achtung: {reporter} hat {reported} in {channel} gemeldet. Grund: \"{reason}\"", + "fr": "Attention : {reporter} a reporté {reported} dans {channel}. Raison donnée : \"{reason}\"", + "it": "Attentzone : {reporter} ha segnalato {reported} in {channel}. Motivo : \"{reason}\"" }, "reported": { "en": "Thank you, {reported} has been reported to the channel administrators.",