View Single Post
02/20/15, 06:10 PM   #5
Kelnoreem
AddOn Author - Click to view addons
Join Date: Feb 2014
Posts: 11
Originally Posted by merlight View Post
It seems kick by name expects raw character name, with gender markup. If that's true, you might have to look the "pretty" name up yourself:
Lua Code:
  1. SLASH_COMMANDS["/tntkick"] = function(name)
  2.     local lcname = zo_strlower(zo_strtrim(name))
  3.     for i = 1, GetGroupSize() do
  4.         local unitTag = GetGroupUnitTagByIndex(i)
  5.         if unitTag and not IsUnitGroupLeader(unitTag) then
  6.             --local rawCharacterName = GetRawUnitName(unitTag)
  7.             local characterName = GetUnitName(unitTag)
  8.             if lcname == zo_strlower(characterName) then
  9.                 GroupKick(unitTag)
  10.                 break
  11.             end
  12.         end
  13.     end
  14. end

Btw there's builtin /invite that does the same thing as yours. But no /kick counterpart.
This looks interesting, I will try it. There is so much to learn, so I appreciate the help.
  Reply With Quote