From 57e7ec7c7e5c908d2e7e0171e9622d099e1c7965 Mon Sep 17 00:00:00 2001 From: Adrien Bourmault Date: Tue, 12 Jan 2021 15:46:42 +0100 Subject: [PATCH] Added server-to-many notice script --- moderation/send_server_notice.sh | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100755 moderation/send_server_notice.sh diff --git a/moderation/send_server_notice.sh b/moderation/send_server_notice.sh new file mode 100755 index 0000000..d1d484e --- /dev/null +++ b/moderation/send_server_notice.sh @@ -0,0 +1,8 @@ +#!/bin/bash +LIST=$(sudo -u ejabberd ejabberdctl connected_users_info | cut -f 1 | cut -d "/" -f 1 | grep $1 | uniq) + +for ADDRESS in $LIST +do + sudo -u ejabberd ejabberdctl send_message headline chapril.org "$ADDRESS" "Annonce du Serveur" "$2" + echo Done with $ADDRESS +done