From 16a22995d61553bbca0a47405ed1a5fe64680088 Mon Sep 17 00:00:00 2001 From: "Kay Marquardt (Gnadelwartz)" Date: Thu, 17 Dec 2020 08:58:32 +0100 Subject: [PATCH] remove nashbot option broadcast, use broadcast.sh --- bashbot.sh | 23 ++++------------------- bin/send_broadcast.sh | 2 +- bin/send_message.sh | 2 +- 3 files changed, 6 insertions(+), 21 deletions(-) diff --git a/bashbot.sh b/bashbot.sh index 6cbcfcf..051b53e 100755 --- a/bashbot.sh +++ b/bashbot.sh @@ -11,7 +11,7 @@ # This file is public domain in the USA and all free countries. # Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying) # -#### $$VERSION$$ v1.2-dev2-29-g85ee757 +#### $$VERSION$$ v1.2-dev2-34-gc356143 # # Exit Codes: # - 0 success (hopefully) @@ -128,7 +128,7 @@ if [ "${SCRIPT}" != "${REALME}" ] || [ "$1" = "source" ]; then SOURCE="yes" fi -BOTCOMMANDS="start, stop, status, help, init, stats, broadcast, suspendback, resumeback, killback" +BOTCOMMANDS="start, stop, status, help, init, stats, suspendback, resumeback, killback" [[ -z "$1" && -z "${SOURCE}" ]] && echo -e "${ORANGE}Available commands: ${GREY}${BOTCOMMANDS}${NC}" && exit if [ "$1" = "help" ]; then HELP="${BASHBOT_HOME:-.}/README" @@ -1279,23 +1279,8 @@ if [ -z "${SOURCE}" ]; then ;; # send message to all users 'broadcast') - ME="$(getConfigKey "botname")" - declare -A SENDALL - shift - jssh_readDB_async "SENDALL" "${COUNTFILE}" - echo -e "Sending broadcast message to all users of ${ME} \c" - for MSG in ${!SENDALL[*]} - do - [[ ! "${MSG}" =~ ^[0-9-]*$ ]] && continue - (( USERS++ )) - if [ -n "$*" ]; then - send_message "${MSG}" "$*" - echo -e ".\c" - sleep 0.1 - fi - done - echo -e "\nMessage \"$*\" sent to ${USERS} users." - debug_checks "end $1" "$@" + echo -e "${ORANGE}Output of ${BASHBOT_HOME:-.}/bin/send_broadcast.sh --help${NC}" + "${BASHBOT_HOME:-.}"/bin/send_broadcast.sh --help exit ;; # does what it says diff --git a/bin/send_broadcast.sh b/bin/send_broadcast.sh index 55bad9b..6f8c0e4 100755 --- a/bin/send_broadcast.sh +++ b/bin/send_broadcast.sh @@ -23,7 +23,7 @@ # AUTHOR: KayM (gnadelwartz), kay@rrr.de # CREATED: 16.12.2020 16:14:57 # -#### $$VERSION$$ v1.2-dev2-33-g1dd546b +#### $$VERSION$$ v1.2-dev2-34-gc356143 #=============================================================================== # set where your bashbot lives diff --git a/bin/send_message.sh b/bin/send_message.sh index d552be5..6fb6316 100755 --- a/bin/send_message.sh +++ b/bin/send_message.sh @@ -21,7 +21,7 @@ # AUTHOR: KayM (gnadelwartz), kay@rrr.de # CREATED: 16.12.2020 11:34:27 # -#### $$VERSION$$ v1.2-dev2-33-g1dd546b +#### $$VERSION$$ v1.2-dev2-34-gc356143 #=============================================================================== # set where your bashbot lives