From 3f4875aff2fb79c618841cd87bade97d48e63f01 Mon Sep 17 00:00:00 2001
From: luk3yx <luk3yx@users.noreply.github.com>
Date: Thu, 31 Oct 2024 14:17:27 +1300
Subject: [PATCH] Remove prev_owner when renaming area

---
 chatcommands.lua | 1 +
 1 file changed, 1 insertion(+)

diff --git a/chatcommands.lua b/chatcommands.lua
index 6bc8f89..4f0d39b 100644
--- a/chatcommands.lua
+++ b/chatcommands.lua
@@ -169,6 +169,7 @@ minetest.register_chatcommand("rename_area", {
 		newName = sub8(newName, 1, areas.config.max_area_name_length)
 
 		areas.areas[id].name = newName
+		areas.areas[id].prev_owner = nil
 		areas:save()
 		return true, S("Area renamed.")
 	end