Strip leading and trailing whitespace from action_line
This commit is contained in:
parent
3a9fe51ef1
commit
53c4d34639
1 changed files with 2 additions and 1 deletions
3
rowbot
3
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
|
||||
|
|
Loading…
Reference in a new issue