From 17c93e2be4ad7b3af0cd6878bdd5d8a4a3e6da99 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 28 Nov 2019 05:53:29 +0100 Subject: Merging upstream version 1.19.0. Signed-off-by: Daniel Baumann --- health/notifications/alarm-notify.sh.in | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'health/notifications/alarm-notify.sh.in') diff --git a/health/notifications/alarm-notify.sh.in b/health/notifications/alarm-notify.sh.in index b56c67e65..0f4350834 100755 --- a/health/notifications/alarm-notify.sh.in +++ b/health/notifications/alarm-notify.sh.in @@ -29,6 +29,7 @@ # - hipchat notifications by @ktsaou #1561 # - fleep notifications by @Ferroin # - prowlapp.com notifications by @Ferroin +# - irc notifications by @manosf # - custom notifications by @ktsaou # - syslog messages by @Ferroin # - Microsoft Team notification by @tioumen @@ -164,6 +165,7 @@ custom msteam kavenegar prowl +irc awssns rocketchat sms @@ -1626,9 +1628,10 @@ send_irc() { *) color="#777777" ;; esac + SNDMESSAGE="${MESSAGE//$'\n'/", "}" for CHANNEL in ${CHANNELS}; do error=0 - send_alarm=$(echo -e "USER ${NICKNAME} guest ${REALNAME} ${SERVERNAME}\\nNICK ${NICKNAME}\\nJOIN ${CHANNEL}\\nPRIVMSG ${CHANNEL} :${MESSAGE}\\nQUIT\\n" \ | nc "${NETWORK}" 6667) + send_alarm=$(echo -e "USER ${NICKNAME} guest ${REALNAME} ${SERVERNAME}\\nNICK ${NICKNAME}\\nJOIN ${CHANNEL}\\nPRIVMSG ${CHANNEL} :${SNDMESSAGE}\\nQUIT\\n" \ | nc "${NETWORK}" 6667) reply_codes=$(echo "${send_alarm}" | cut -d ' ' -f 2 | grep -o '[0-9]*') for code in ${reply_codes}; do if [ "${code}" -ge 400 ] && [ "${code}" -le 599 ]; then -- cgit v1.2.3