From 3145cdea9ce52bfd7f5defddc9d4f9fc8474d7c3 Mon Sep 17 00:00:00 2001 From: Anthony Recascino Date: Sat, 30 Jul 2016 01:09:07 -0400 Subject: [PATCH] Loyalty? --- factions.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/factions.lua b/factions.lua index 62964b4..5772ede 100644 --- a/factions.lua +++ b/factions.lua @@ -244,7 +244,11 @@ function factions.member_add(name, object) if object.object ~= nil then object = object.object end - + if next(factions.get_factions(object)) ~= nil then + for k,v in pairs(factions.get_factions(object)) do + factions.member_remove(k,object) + end + end if not factions.exists(name) then print("Unable to add to NON existant faction >" .. name .. "<") return false