From 9b1119d51dea33d5dce3df7d5221117bc651f805 Mon Sep 17 00:00:00 2001 From: "Kay Marquardt (Gnadelwartz)" Date: Thu, 2 Jul 2020 17:24:56 +0200 Subject: [PATCH] move individual debug checks to mycommands.sh part 2 --- bashbot.sh | 5 +++-- mycommands.sh | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/bashbot.sh b/bashbot.sh index b1753ed..2f30481 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.98-0-g5b5447e +#### $$VERSION$$ v0.98-3-g28de99e # # Exit Codes: # - 0 success (hopefully) @@ -86,7 +86,8 @@ debug_checks(){ [ -z "${MYTOKEN}" ] && printf "%s: %s\n" "${DATE}" "Bot token is missing! ==========" check_token "${MYTOKEN}" || printf "%s: %s\n" "${DATE}" "Invalid bot token! ==========" [ -z "$(getConfigKey "botadmin")" ] && printf "%s: %s\n" "${DATE}" "Bot admin is missing! ==========" - [ -f ".jssh" ] && printf "%s: %s\n" "${DATE}" "Ups, found file \"${PWD:-.}/.jssh\"! ==========" + # call user defined debug_checks if exists + _exec_if_function my_debug_checks "${DATE}" "${WHERE}" "$*" } >>"${DEBUGLOG}" # get location and name of bashbot.sh diff --git a/mycommands.sh b/mycommands.sh index fcecce8..f03b7d6 100644 --- a/mycommands.sh +++ b/mycommands.sh @@ -8,7 +8,7 @@ # #### if you start to develop your own bot, use the clean version of this file: # #### mycommands.clean # -#### $$VERSION$$ v0.98-1-g550387b +#### $$VERSION$$ v0.98-2-g2d48670 # # uncomment the following lines to overwrite info and help messages