From bd9eb79d63db1e154c04c300f5dfa27f239420a8 Mon Sep 17 00:00:00 2001 From: Nick Chambers Date: Sun, 20 Jun 2021 19:39:18 -0500 Subject: [PATCH] Strip leading and trailing whitespace from action_line --- rowbot | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rowbot b/rowbot index 24c962f..24aacf5 100755 --- a/rowbot +++ b/rowbot @@ -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