aboutsummarylogtreecommitdiffstats
path: root/papermc.sh
diff options
context:
space:
mode:
authorGordian Edenhofer2019-09-25 09:55:27 +0200
committerGordian Edenhofer2019-09-25 10:00:14 +0200
commite4ec98815101f3329fcd73ca083144a38f96af11 (patch)
treebe1964610a43b3d01174e73453aae76a79119e22 /papermc.sh
parentfd07ec7f74ac2bb6c090d3e4b2ab3bc34b3417cc (diff)
downloadaur-e4ec98815101f3329fcd73ca083144a38f96af11.tar.gz
upgpkg: minecraft-server 1.14.4-2
Fix a bug which was most likely introduced in ada9f5931d preventing the `is_player_online` function to parse the response properly for some servers and in particular papermc. The bug deleted lines which were not intended to be deleted. As a fix, just stop deleting any lines as all subsequent invocations use grep anyway and hence already select the right line. upgpkg: cuberite 1.12b1049-1 upgpkg: papermc 1.14.4+b196-1 upgpkg: spigot 1.14.4+b103-2
Diffstat (limited to 'papermc.sh')
-rwxr-xr-xpapermc.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/papermc.sh b/papermc.sh
index 83b31b7b5274..b993735ad8d9 100755
--- a/papermc.sh
+++ b/papermc.sh
@@ -83,10 +83,10 @@ game_command() {
is_player_online() {
response="$(sleep_time=0.6 return_stdout=true game_command list)"
# Delete leading line and free response string from fancy characters
- response="$(echo "${response}" | sed -r -e '$!d' -e 's/\x1B\[([0-9]{1,2}(;[0-9]{1,2})*)?[JKmsuG]//g')"
+ response="$(echo "${response}" | sed -r -e 's/\x1B\[([0-9]{1,2}(;[0-9]{1,2})*)?[JKmsuG]//g')"
# The list command prints a line containing the usernames after the last occurrence of ": "
# and since playernames may not contain this string the clean player-list can easily be retrieved.
- # Otherwiese check the first digit after the last occurrence of "There are". If it is 0 then there
+ # Otherwise check the first digit after the last occurrence of "There are". If it is 0 then there
# are no players on the server. Should this test fail as well. Assume that a player is online.
if [[ $(echo "${response}" | grep ":" | sed -e 's/.*\: //' | tr -d '\n' | wc -c) -le 1 ]]; then
# No player is online
@@ -473,7 +473,7 @@ case "${1:-}" in
;;
idle_server_daemon)
- # This shell be a hidden function which should only be invoced internally
+ # This shall be a hidden function which should only be invoced internally
idle_server_daemon
;;