When the below is the entirety of your addon during a beta key giveaway to addon authors, something up.
Code:
local popups = {}
local _G = getfenv(0)
for i=1,STATICPOPUP_NUMDIALOGS do
table.insert(popups, _G["StaticPopup"..i])
end
local function IsFriend(name)
for i=1,GetNumFriends() do
if GetFriendInfo(i) == name then return true end
end
if not IsInGuild() then return end
for i=1, GetNumGuildMembers() do
if GetGuildRosterInfo(i) == name then return true end
end
end
local function Acceptance_OnEvent()
local inviter = arg1
if IsFriend(inviter) then
AcceptGroup()
for _,f in ipairs(popups) do
if f:IsVisible() and f.which == "PARTY_INVITE" then f:Hide() end
end
else SendWho("n-\"".. inviter.. "\"") end
end
Acceptance = CreateFrame("Frame")
Acceptance:SetScript("OnEvent", Acceptance_OnEvent)
Acceptance:RegisterEvent("PARTY_INVITE_REQUEST")
__________________
kúdan: im playing pantheon JRCapablanca: no youre not ** Pantheon has been Banned. **