Skip to content

Commit

Permalink
Merge pull request #15 from jammsen/master
Browse files Browse the repository at this point in the history
Update from upstream
  • Loading branch information
ripps818 authored Apr 5, 2024
2 parents e7242ed + e7c3c52 commit 5a5c620
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 85 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

[Back to main](README.md#changelog)

## 2024-03-04

- Fixed typo
- Removed 0.1.5.0 -rcon workaround
- Cleanup code
- No default.env update needed, just update image, down and up and your good

## 2024-02-27

- Added clearer descriptions in the ENV_VARS documentation by @m1xzg
Expand Down
2 changes: 1 addition & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ APP_HOME=/home/$APP_USER
source /includes/colors.sh

if [[ "${PUID}" -eq 0 ]] || [[ "${PGID}" -eq 0 ]]; then
ee ">>> Running as root is not supported, please fix your PUID and PGID!"
ee ">>> Running Palworld as root is not supported, please fix your PUID and PGID!"
exit 1
elif [[ "$(id -u steam)" -ne "${PUID}" ]] || [[ "$(id -g steam)" -ne "${PGID}" ]]; then
ew "> Current $APP_USER user PUID is '$(id -u steam)' and PGID is '$(id -g steam)'"
Expand Down
80 changes: 0 additions & 80 deletions includes/playerdetection.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,87 +11,7 @@ player_detection_loop() {
sleep "$RCON_PLAYER_DETECTION_CHECK_INTERVAL"
done
}
#v1
# # Function to compare current and previous player lists
# compare_players() {
# local old_players=("${current_players[@]}")
# readarray -t current_players < <(rcon showplayers | tail -n +2 | awk -F ',' '{print $1}')

# for player in "${current_players[@]}"; do
# local found=false
# for old_player in "${old_players[@]}"; do
# if [ "$old_player" = "$player" ]; then
# found=true
# break
# fi
# done
# if ! $found; then
# announce_join "$player"
# fi
# done
# for player in "${old_players[@]}"; do
# local found=false
# for current_player in "${current_players[@]}"; do
# if [ "$current_player" = "$player" ]; then
# found=true
# break
# fi
# done
# if ! $found; then
# announce_leave "$player"
# fi
# done
# }

#v2
# Function to compare current and previous player lists
# compare_players() {
# local old_players=("${current_players[@]}")
# readarray -t current_players < <(rcon showplayers | tail -n +2)

# for player_info in "${current_players[@]}"; do
# # Extract player name, UID, and Steam ID from player info
# IFS=',' read -r name playeruid steamid <<< "$player_info"
# ew "$name"
# ew "$playeruid"
# ew "$steamid"

# local found=false
# for old_player_info in "${old_players[@]}"; do
# IFS=',' read -r old_name old_playeruid old_steamid <<< "$old_player_info"
# ew "$old_name"
# ew "$old_playeruid"
# ew "$old_steamid"
# if [[ "$old_steamid" == "$steamid" ]]; then
# found=true
# if [[ "$old_playeruid" == "00000000" && "$playeruid" != "00000000" ]]; then
# announce_name_change "$old_name" "$name"
# fi
# break
# fi
# done
# if ! $found; then
# announce_join "$name"
# fi
# done

# for old_player_info in "${old_players[@]}"; do
# IFS=',' read -r old_name old_playeruid old_steamid <<< "$old_player_info"
# local found=false
# for player_info in "${current_players[@]}"; do
# IFS=',' read -r name playeruid steamid <<< "$player_info"
# if [[ "$old_steamid" == "$steamid" ]]; then
# found=true
# break
# fi
# done
# if ! $found; then
# announce_leave "$old_name"
# fi
# done
# }

#v3
# Function to compare current and previous player lists
compare_players() {
local old_players=("${current_players[@]}")
Expand Down
4 changes: 0 additions & 4 deletions includes/server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@ function start_server() {
e "> Setting Multi-Core-Enhancements to enabled"
START_OPTIONS+=("-useperfthreads" "-NoAsyncLoadingThread" "-UseMultithreadForDS")
fi
if [[ -n $RCON_ENABLED ]] && [[ $RCON_ENABLED == "true" ]]; then
e "> Enabling RCON port"
START_OPTIONS+=("-rcon")
fi
if [[ -n $WEBHOOK_ENABLED ]] && [[ $WEBHOOK_ENABLED == "true" ]]; then
send_start_notification
fi
Expand Down

0 comments on commit 5a5c620

Please sign in to comment.