more save split to array

This commit is contained in:
Kay Marquardt (Gnadelwartz) 2020-06-22 18:38:15 +02:00
parent 4fe969766b
commit 80a6dbbe9f
2 changed files with 3 additions and 10 deletions

View File

@ -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-dev-66-gd52ea8c #### $$VERSION$$ v0.98-dev-67-g4fe9697
# #
# Exit Codes: # Exit Codes:
# - 0 sucess (hopefully) # - 0 sucess (hopefully)
@ -839,14 +839,7 @@ process_message() {
[[ "${SERVICE[*]}" =~ ^[[:blank:]]*$ ]] || SERVICE[0]="yes" [[ "${SERVICE[*]}" =~ ^[[:blank:]]*$ ]] || SERVICE[0]="yes"
# split message in command and args # split message in command and args
CMD=( ) [ "${MESSAGE[0]:0:1}" = "/" ] && read -r CMD <<<"${MESSAGE[0]}" && CMD[0]="${CMD[0]%%@*}"
if [[ "${MESSAGE[0]}" == "/"* ]]; then
set -f; unset IFS
# shellcheck disable=SC2206
CMD=( ${MESSAGE[0]} )
CMD[0]="${CMD[0]%%@*}"
set +f
fi
} }
######################### #########################

View File

@ -5,7 +5,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-dev-66-gd52ea8c #### $$VERSION$$ v0.98-dev-67-g4fe9697
# will be automatically sourced from bashbot # will be automatically sourced from bashbot