Skip to content

Commit

Permalink
Fix whitelisted players being unable to enter with VPN
Browse files Browse the repository at this point in the history
  • Loading branch information
Arie committed Aug 13, 2024
1 parent 01f8c47 commit 044e104
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/workers/log_worker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def handle_connect
rp = ReservationPlayer.where(reservation_id: reservation_id, ip: ip, steam_uid: community_id).first_or_create
rp.update(name: event.player.name)

if ReservationPlayer.banned_asn_ip?(ip) && ReservationPlayer.whitelisted_uid?(community_id)
if ReservationPlayer.banned_asn_ip?(ip) && !ReservationPlayer.whitelisted_uid?(community_id)
reservation.server.rcon_exec "kickid \"#{event.player.steam_id}\"[#{SITE_HOST}] Please play without VPN\""
reservation.server.rcon_exec "addip 0 #{ip}"
Rails.logger.info "Removed player on VPN with UID #{community_id}, IP #{event.message}, name #{event.player.name}, from reservation #{reservation_id}"
Expand Down

0 comments on commit 044e104

Please sign in to comment.