Strip leading and trailing whitespace from action_line

This commit is contained in:
Nick Chambers 2021-06-20 19:39:18 -05:00
parent cf3a49d919
commit bd9eb79d63
1 changed files with 2 additions and 1 deletions

3
rowbot
View File

@ -779,7 +779,7 @@ hook_cmd_control_panel() {
msg)
recipient=${action_line%% *}
msg=${action_line#"$recipient"* }
declare -p recipient msg action_line
read -r msg <<< "$msg"
privmsg "$recipient" "$msg"
privmsg "$to" "sent message to $recipient"
esac
@ -874,6 +874,7 @@ while recv line; do
is_action=yes
action=${last#"$trigger"} action=${action%% *}
action_line=${last#"$trigger$action" }
read -r action_line <<< "$action_line"
read -ra action_args <<< "$action_line"
fi
fi