mirror of
https://github.com/itzg/docker-minecraft-server
synced 2024-11-10 06:14:14 +00:00
Interpret backslash escapes for RCON_CMDS (#3008)
This commit is contained in:
parent
d7c6a7d2b6
commit
b393b22136
1 changed files with 5 additions and 5 deletions
|
@ -44,7 +44,7 @@ do
|
||||||
if [[ "$RCON_CMDS_STARTUP" ]]; then
|
if [[ "$RCON_CMDS_STARTUP" ]]; then
|
||||||
while read -r cmd; do
|
while read -r cmd; do
|
||||||
run_command "$cmd"
|
run_command "$cmd"
|
||||||
done <<< "$RCON_CMDS_STARTUP"
|
done <<< "$(echo -e "$RCON_CMDS_STARTUP")"
|
||||||
fi
|
fi
|
||||||
if
|
if
|
||||||
[[ -z "$RCON_CMDS_ON_CONNECT" ]] &&
|
[[ -z "$RCON_CMDS_ON_CONNECT" ]] &&
|
||||||
|
@ -66,7 +66,7 @@ do
|
||||||
logRcon "First Clients has Connected, running first connect cmds"
|
logRcon "First Clients has Connected, running first connect cmds"
|
||||||
while read -r cmd; do
|
while read -r cmd; do
|
||||||
run_command "$cmd"
|
run_command "$cmd"
|
||||||
done <<< "$RCON_CMDS_FIRST_CONNECT"
|
done <<< "$(echo -e "$RCON_CMDS_FIRST_CONNECT")"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# When a client joins
|
# When a client joins
|
||||||
|
@ -74,13 +74,13 @@ do
|
||||||
logRcon "Clients have Connected, running connect cmds"
|
logRcon "Clients have Connected, running connect cmds"
|
||||||
while read -r cmd; do
|
while read -r cmd; do
|
||||||
run_command "$cmd"
|
run_command "$cmd"
|
||||||
done <<< "$RCON_CMDS_ON_CONNECT"
|
done <<< "$(echo -e "$RCON_CMDS_ON_CONNECT")"
|
||||||
# When a client leaves
|
# When a client leaves
|
||||||
elif (( CURR_CLIENTCONNECTIONS < CLIENTCONNECTIONS )) && [[ "$RCON_CMDS_ON_DISCONNECT" ]]; then
|
elif (( CURR_CLIENTCONNECTIONS < CLIENTCONNECTIONS )) && [[ "$RCON_CMDS_ON_DISCONNECT" ]]; then
|
||||||
logRcon "Clients have Disconnected, running disconnect cmds"
|
logRcon "Clients have Disconnected, running disconnect cmds"
|
||||||
while read -r cmd; do
|
while read -r cmd; do
|
||||||
run_command "$cmd"
|
run_command "$cmd"
|
||||||
done <<< "$RCON_CMDS_ON_DISCONNECT"
|
done <<< "$(echo -e "$RCON_CMDS_ON_DISCONNECT")"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Last client connection
|
# Last client connection
|
||||||
|
@ -89,7 +89,7 @@ do
|
||||||
logRcon "ALL Clients have Disconnected, running last disconnect cmds"
|
logRcon "ALL Clients have Disconnected, running last disconnect cmds"
|
||||||
while read -r cmd; do
|
while read -r cmd; do
|
||||||
run_command "$cmd"
|
run_command "$cmd"
|
||||||
done <<< "$RCON_CMDS_LAST_DISCONNECT"
|
done <<< "$(echo -e "$RCON_CMDS_LAST_DISCONNECT")"
|
||||||
fi
|
fi
|
||||||
CLIENTCONNECTIONS=$CURR_CLIENTCONNECTIONS
|
CLIENTCONNECTIONS=$CURR_CLIENTCONNECTIONS
|
||||||
;;
|
;;
|
||||||
|
|
Loading…
Reference in a new issue