From 76396894aa35b8e6be000b4166dbbfc1826b9ec3 Mon Sep 17 00:00:00 2001 From: jere0500 Date: Mon, 29 Apr 2024 16:43:30 +0200 Subject: [PATCH] Ignore Lobby password on joining, when gatekeeper is set to friends --- lib/teiserver/coordinator/consul_server.ex | 2 +- lib/teiserver/lobby.ex | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/teiserver/coordinator/consul_server.ex b/lib/teiserver/coordinator/consul_server.ex index 75d5eca7c..1ade688d4 100644 --- a/lib/teiserver/coordinator/consul_server.ex +++ b/lib/teiserver/coordinator/consul_server.ex @@ -1001,7 +1001,7 @@ defmodule Teiserver.Coordinator.ConsulServer do state.gatekeeper == "friends" -> if is_on_friendlist?(userid, state, :all) do - {true, nil} + {true, :allow_friends} else {false, "Friends only gatekeeper"} end diff --git a/lib/teiserver/lobby.ex b/lib/teiserver/lobby.ex index 000d8470e..4b72d3e3e 100644 --- a/lib/teiserver/lobby.ex +++ b/lib/teiserver/lobby.ex @@ -565,7 +565,7 @@ defmodule Teiserver.Lobby do Enum.any?([ CacheUser.is_moderator?(user), Enum.member?(user.roles, "Caster"), - consul_reason == :override_approve + consul_reason in [:override_approve, :allow_friends] ]) ignore_locked =