Adjust kickByName to remove from kick table regardless and print message if kick failed.

Sasky [06-13-14 - 23:42]
Adjust kickByName to remove from kick table regardless and print message if kick failed.
Filename
AutoInvite.lua
diff --git a/AutoInvite.lua b/AutoInvite.lua
index 5a733e0..b2acfbd 100644
--- a/AutoInvite.lua
+++ b/AutoInvite.lua
@@ -74,14 +74,15 @@ end

 --Since KickByName doesn't seem to be working
 function AutoInvite.kickByName(name)
+    AutoInvite.kickTable[name] = nil
     for i=1,GetGroupSize() do
         local tag = GetGroupUnitTagByIndex(i)
         if GetUnitName(tag) == name then
             GroupKick(tag)
-            AutoInvite.kickTable[name] = nil
             return
         end
     end
+    d("No one named " .. name .. " found in group scan. Please manually kick.")
 end

 ------------------------------------------------