mirror of
https://github.com/octoleo/telegram-bot-bash.git
synced 2024-11-26 09:16:28 +00:00
fix of fix test errors
This commit is contained in:
parent
e6de3828d3
commit
456e86b932
13
bashbot.sh
13
bashbot.sh
@ -11,7 +11,7 @@
|
|||||||
# 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)
|
||||||
#
|
#
|
||||||
#### $$VERSION$$ v0.98-pre2-10-gae4610a
|
#### $$VERSION$$ v0.98-pre2-11-ge6de382
|
||||||
#
|
#
|
||||||
# Exit Codes:
|
# Exit Codes:
|
||||||
# - 0 success (hopefully)
|
# - 0 success (hopefully)
|
||||||
@ -869,14 +869,9 @@ process_message() {
|
|||||||
[[ "${SERVICE[*]}" =~ ^[[:blank:]]*$ ]] || SERVICE[0]="yes"
|
[[ "${SERVICE[*]}" =~ ^[[:blank:]]*$ ]] || SERVICE[0]="yes"
|
||||||
|
|
||||||
# split message in command and args
|
# split message in command and args
|
||||||
#[[ "${MESSAGE[0]}" == "/"* ]] && read -r CMD <<<"${MESSAGE[0]}" && CMD[0]="${CMD[0]%%@*}"
|
[[ "${MESSAGE[0]}" == "/"* ]] && read -r CMD <<<"${MESSAGE[0]}" && CMD[0]="${CMD[0]%%@*}"
|
||||||
if [[ "${MESSAGE[0]}" == "/"* ]]; then
|
# everything went well
|
||||||
set -f; unset IFS
|
return 0
|
||||||
# shellcheck disable=SC2206
|
|
||||||
CMD=( ${MESSAGE[0]} )
|
|
||||||
CMD[0]="${CMD[0]%%@*}"
|
|
||||||
set +f
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#########################
|
#########################
|
||||||
|
Loading…
Reference in New Issue
Block a user