From 4e2db97634bf66fe48d30e064f987070d71a9915 Mon Sep 17 00:00:00 2001 From: Chris Date: Sat, 2 Nov 2013 21:58:56 -0700 Subject: [PATCH] Support for multiple word commands in mc_exec added support for commands that are comprised of multiple words, such as "/op cisien" --- script/minecraft | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/script/minecraft b/script/minecraft index 4a4b0a0..b1c686d 100644 --- a/script/minecraft +++ b/script/minecraft @@ -218,7 +218,13 @@ mc_thinoutbackup() { mc_exec() { if is_running; then - screen -p 0 -S $(cat $MCPATH/screen.name) -X stuff "$@$(printf \\r)" + execargs="" + for arg in $@ + do + execargs+="$arg " + done + + screen -p 0 -S $(cat $MCPATH/screen.name) -X stuff "$execargs$(printf \\r)" else echo "$SERVICE was not running. Not executing command." fi