Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update from upstream #15

Merged
merged 5 commits into from
Apr 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -17,10 +17,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