~gpcf/misc-patches

Forgot to add a check with minetest.player_exists for when empty password v1 APPLIED

erstazi: 1
 Forgot to add a check with minetest.player_exists for when empty password

 1 files changed, 1 insertions(+), 1 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~gpcf/misc-patches/patches/50671/mbox | git am -3
Learn more about email & git

[PATCH] Forgot to add a check with minetest.player_exists for when empty password Export this patch

---
 init.lua | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/init.lua b/init.lua
index 0675c26..59b6049 100644
--- a/init.lua
+++ b/init.lua
@@ -288,7 +288,7 @@ minetest.register_on_prejoinplayer(function(name, ip)
		return ("Banned: Expires: %s, Reason: %s"):format(
		  date, e.reason)
	end
	if not xban.has_password(name) then
	if minetest.player_exists(name) and not xban.has_password(name) then
		return "This account has been deactivated. Please, contact the server owner on the forums."
	end
	if minetest.settings:get("moderate_new_accounts") and not minetest.player_exists(name) then