From 456e86b932bfef22fb23622418153c681d1592b8 Mon Sep 17 00:00:00 2001 From: "Kay Marquardt (Gnadelwartz)" Date: Sat, 27 Jun 2020 18:51:17 +0200 Subject: [PATCH] fix of fix test errors --- bashbot.sh | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/bashbot.sh b/bashbot.sh index aa4d382..29b18f7 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-pre2-10-gae4610a +#### $$VERSION$$ v0.98-pre2-11-ge6de382 # # Exit Codes: # - 0 success (hopefully) @@ -869,14 +869,9 @@ process_message() { [[ "${SERVICE[*]}" =~ ^[[:blank:]]*$ ]] || SERVICE[0]="yes" # split message in command and args - #[[ "${MESSAGE[0]}" == "/"* ]] && 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 + [[ "${MESSAGE[0]}" == "/"* ]] && read -r CMD <<<"${MESSAGE[0]}" && CMD[0]="${CMD[0]%%@*}" + # everything went well + return 0 } #########################