mirror of
https://github.com/octoleo/telegram-bot-bash.git
synced 2024-11-22 07:25:10 +00:00
printf part 2
This commit is contained in:
parent
03bdecb056
commit
de31231a24
@ -4,7 +4,7 @@
|
|||||||
# Addons can register to bashbot events at startup
|
# Addons can register to bashbot events at startup
|
||||||
# by providing their name and a callback per event
|
# by providing their name and a callback per event
|
||||||
#
|
#
|
||||||
#### $$VERSION$$ v1.20-0-g2ab00a2
|
#### $$VERSION$$ v1.21-dev-1-g03bdecb
|
||||||
#
|
#
|
||||||
# If an event occurs each registered event function is called.
|
# If an event occurs each registered event function is called.
|
||||||
#
|
#
|
||||||
@ -109,6 +109,6 @@ if [[ "$1" = "start"* ]]; then
|
|||||||
# Note: do not call any send message functions from EVENT_SEND!
|
# Note: do not call any send message functions from EVENT_SEND!
|
||||||
example_log(){
|
example_log(){
|
||||||
local send="$1"; shift
|
local send="$1"; shift
|
||||||
echo "$(date): Type: ${send} Args: $*" >>"${EXAMPLE_LOG}"
|
printf "%s: Type: %s Args: %s\n" "$(date)" "${send}" "$*" >>"${EXAMPLE_LOG}"
|
||||||
}
|
}
|
||||||
fi
|
fi
|
||||||
|
@ -5,8 +5,8 @@
|
|||||||
# This file is public domain in the USA and all free countries.
|
# This file is public domain in the USA and all free countries.
|
||||||
# Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying)
|
# Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying)
|
||||||
#
|
#
|
||||||
# shellcheck disable=SC1117
|
# shellcheck disable=SC1117,SC2059
|
||||||
#### $$VERSION$$ v1.20-0-g2ab00a2
|
#### $$VERSION$$ v1.21-dev-1-g03bdecb
|
||||||
|
|
||||||
# will be automatically sourced from bashbot
|
# will be automatically sourced from bashbot
|
||||||
|
|
||||||
@ -129,7 +129,7 @@ job_control() {
|
|||||||
ADM="$(getConfigKey "botadmin")"
|
ADM="$(getConfigKey "botadmin")"
|
||||||
debug_checks "Enter job_control" "${1}"
|
debug_checks "Enter job_control" "${1}"
|
||||||
for FILE in "${DATADIR:-.}/"*-back.cmd; do
|
for FILE in "${DATADIR:-.}/"*-back.cmd; do
|
||||||
[ "${FILE}" = "${DATADIR:-.}/*-back.cmd" ] && echo -e "${RED}No background processes.${NC}" && break
|
[ "${FILE}" = "${DATADIR:-.}/*-back.cmd" ] && printf "${RED}No background processes.${NN}" && break
|
||||||
content="$(< "${FILE}")"
|
content="$(< "${FILE}")"
|
||||||
CHAT="${content%%:*}"
|
CHAT="${content%%:*}"
|
||||||
job="${content#*:}"
|
job="${content#*:}"
|
||||||
|
Loading…
Reference in New Issue
Block a user