From 152db6995f15c231a5cb7883f472d05fd21ebf28 Mon Sep 17 00:00:00 2001 From: reality Date: Sat, 17 Aug 2013 19:01:05 +0000 Subject: [PATCH] add notifications for quiet [close #550] --- modules/kick/commands.js | 11 +++++++++++ modules/kick/strings.json | 6 ++++++ 2 files changed, 17 insertions(+) diff --git a/modules/kick/commands.js b/modules/kick/commands.js index 6221c5e..3b679e0 100644 --- a/modules/kick/commands.js +++ b/modules/kick/commands.js @@ -25,8 +25,19 @@ var commands = function(dbot) { 'quietee': quietee, 'minutes': minutes })); + dbot.api.report.notify(server, channel, dbot.t('tquiet_notify', { + 'quieter': quieter, + 'channel': channel, + 'quietee': quietee, + 'minutes': minutes + })); } else { event.reply(dbot.t('quieted', { 'quietee': quietee })); + dbot.api.report.notify(server, channel, dbot.t('quiet_notify', { + 'quieter': quieter, + 'channel': channel, + 'quietee': quietee + })); } this.api.quiet(server, quietee, channel); diff --git a/modules/kick/strings.json b/modules/kick/strings.json index 9763ea8..746fb1a 100644 --- a/modules/kick/strings.json +++ b/modules/kick/strings.json @@ -19,6 +19,12 @@ "fr": "{quietee} a été rendu silencieux pour {minutes} minutes. Rappelle-toi : ne sois pas têtu.", "it": "{quietee} è stato silenziato per {minutes} minuto/i. Ricordati: non essere testardo" }, + "quiet_notify": { + "en": "Attention: {quieter} has quieted {quietee} in {channel}." + }, + "tquiet_notify": { + "en": "Attention: {quieter} has quieted {quietee} in {channel} for {minutes} minutes." + }, "unquieted": { "en": "Unquieted {quietee}. Remember: don't be a coconut.", "fr": "{quietee} peut maintenant parler. Rappelle-toi : ne sois pas têtu.",