Originally Posted by Nirrudn
You can get the raid leader by doing something like this:
|
The problem with that is that other people could spam the RL by clicking the button. The addon should respond to whoever actually sent the request, which you get as part of the CHAT_MSG_ADDON event. The above code *would* be a good way to confirm if that person is the RL, although I would modify it a little bit to:
Code:
for i = 1, 40 do
local name,rank = GetRaidRosterInfo(i)
if name == sender and rank > 1 then --sender will have already been set to whoever sent the request
--display your frame with the request
break
end
end