From ec856365edb60cfca153ac4804d55d6b648e9652 Mon Sep 17 00:00:00 2001 From: "Kay Marquardt (Gnadelwartz)" Date: Sat, 25 May 2019 20:11:50 +0200 Subject: [PATCH] check if send_message is availible --- bashbot.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/bashbot.sh b/bashbot.sh index eb70772..29c2778 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$$ v0.80-28-g64b4055 +#### $$VERSION$$ v0.80-29-gbee9f33 # # Exit Codes: # - 0 sucess (hopefully) @@ -56,6 +56,7 @@ fi ADDONDIR="${BASHBOT_ETC:-./addons}" + RUNUSER="${USER}" # USER is overwritten by bashbot array if [ "${SOURCE}" != "yes" ] && [ "$BASHBOT_HOME" = "" ] && ! cd "${RUNDIR}" ; then @@ -152,7 +153,8 @@ else fi -# internal functions +################# +# BASHBOT INTERNAL functions # $1 URL, $2 filename in TMPDIR # outputs final filename download() { @@ -577,6 +579,11 @@ bot_init() { fi } +if _is_function send_message ; then + echo -e "${RED}ERROR: send_message is not availible, did you deactivate ${MODULEDIR}/senMessage.sh?${NC}" + exit 1 +fi + JSONSHFILE="${BASHBOT_JSONSH:-${RUNDIR}/JSON.sh/JSON.sh}" [[ "${JSONSHFILE}" != *"/JSON.sh" ]] && echo -e "${RED}ERROR: \"${JSONSHFILE}\" ends not with \"JSONS.sh\".${NC}" && exit 3