From ebb0a023c0cabedb250f7efa66fa05870aeee736 Mon Sep 17 00:00:00 2001 From: reality Date: Sat, 10 Feb 2018 12:59:02 +0000 Subject: [PATCH] more appropriate note string --- modules/warning/strings.json | 3 +++ modules/warning/warning.js | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/modules/warning/strings.json b/modules/warning/strings.json index d438192..2a1929d 100644 --- a/modules/warning/strings.json +++ b/modules/warning/strings.json @@ -11,6 +11,9 @@ "it": "{user} a {num} avvertenze. Ulteriori informazioni si trovano a {url}", "de": "{user} hat {num} Verwarnung. Mehr Informationen sind auf {url} erhältlich" }, + "note_notify": { + "en": "{warner} has added a note regarding {warnee}: {reason}" + }, "warn_notify": { "en": "{warner} has issued a warning to {warnee} for \"{reason}.\"", "fr": "Attention : {warner} a donné un avertissement à {warnee} pour \"{reason}.\". Plus d'informations peuvent être trouvées ici : {url}", diff --git a/modules/warning/warning.js b/modules/warning/warning.js index 0c291c5..ba79507 100644 --- a/modules/warning/warning.js +++ b/modules/warning/warning.js @@ -17,7 +17,11 @@ var warning = function(dbot) { 'reason': reason, 'time': new Date().getTime() }, function(err) { - var notifyString = dbot.t('warn_notify', { + var sType = 'warn_notify'; + if(reason.match('#note')) { + sType = 'note_notify'; + } + var notifyString = dbot.t(sType, { 'warner': warner.primaryNick, 'warnee': warnee.primaryNick, 'reason': reason,