From e3068026a48b520af7af72cb071c4b77874ee525 Mon Sep 17 00:00:00 2001 From: Anthony Recascino Date: Sun, 31 Jul 2016 11:43:04 -0400 Subject: [PATCH] Finished most things --- chatcommands.lua | 1 + factionsmod.lua | 3 +++ 2 files changed, 4 insertions(+) diff --git a/chatcommands.lua b/chatcommands.lua index 3db29f6..ee29b6f 100644 --- a/chatcommands.lua +++ b/chatcommands.lua @@ -229,6 +229,7 @@ function factionsmod_chat.cmdhandler(playername,parameter) --delete faction if cmd == "delete" then + factionsmod.member_remove(params[2],player) if factionsmod.delete_faction(params[2]) then minetest.chat_send_player(playername, "factionsmod: deleted faction " .. params[2], diff --git a/factionsmod.lua b/factionsmod.lua index e3e0644..4f5692b 100644 --- a/factionsmod.lua +++ b/factionsmod.lua @@ -238,6 +238,9 @@ end ------------------------------------------------------------------------------- function factionsmod.delete_faction(name) + for k,v in pairs(factionsmod.dynamic_data.membertable[name]) do + factionsmod.member_remove(name,v) + end factionsmod.data.factionsmod[name] = nil factionsmod.save()