GuildInvite()

72 Human Paladin
5275
Is GuildInvite a protected function now? I have an addon that makes use of this function and it worked for a long time but recently, it's been throwing taint errors and I can't figure out why. (And no, the addon doesn't spam guild invites. It simply makes it possible for someone to easily get themselves invited to my guild)
Reply Quote
90 Draenei Shaman
13640
Do you still get errors if your addon is the only AddOn loaded?
Reply Quote
72 Human Paladin
5275
Yes. I enabled Swatter to get a complete report and got

Date: 2012-07-28 21:43:47
ID: 1
Error occured in: AddOn: gInviteMe
Count: 1
Message: Warning: AddOn gInviteMe attempted to call a protected function (GuildInvite()) which may require interaction.
Debug:
[C]: GuildInvite()
gInviteMe\gInviteMe.lua:22: Invitez0rz()
gInviteMe\gInviteMe.lua:15:
gInviteMe\gInviteMe.lua:11
AddOns:
Swatter, v5.13.5258 (BoldBandicoot)
gInviteMe, v1.2.2
BlizRuntimeLib_enUS v4.3.4.40300 <us>
(ck=62)
Reply Quote
90 Dwarf Mage
10875
What does /dump issecurevariable("GuildInvite") output with and without your AddOn enabled?

http://www.wowpedia.org/API_issecurevariable
Reply Quote
72 Human Paladin
5275
[1]=1 without the addon enabled.

Same with it enabled.
Reply Quote
90 Draenei Shaman
13640
Looks like it requires a hardware event to trigger an invite. Probably quietly patched in some time ago.
Reply Quote
90 Dwarf Mage
10875
From a bit of testing, it seems that GuildInvite requires a hardware event. I have no idea when this was implemented.

To test whether a function (GuildInvite in this case) is protected in some form, install SlashIn or InDemand and use this directly after reloading your UI:/in 1 /run GuildInvite("Someplayerthatdoesntexist")

If it's protected, you should see a popup saying A macro script has been blocked from an action only available to the Blizzard UI.

If it just requires a hardware event, you'll see "Interface action failed because of an AddOn" printed in your chat. This message only seems to print once per session regardless of how many protected functions are called insecurely, that's why you should use this test right after a UI reload.

If it's only protected in combat and you test while in combat, you'll see the same chat message as above.

If it's not protected in any way, no message will be printed.

Edit: What Unkle said.
Edit 2: Turns out the first test can be used to distinguish between all three forms of protection, so the second test isn't needed.
Edited by Choonster on 7/28/2012 7:54 AM PDT
Reply Quote
72 Human Paladin
5275
07/28/2012 07:40 AMPosted by Unkle
Looks like it requires a hardware event to trigger an invite. Probably quietly patched in some time ago.


Disappointing. Unfortunately, a hardware event defeats the purpose of the addon so I think I'll just retire the addon.

Thanks guys.
Reply Quote

Please report any Code of Conduct violations, including:

Threats of violence. We take these seriously and will alert the proper authorities.

Posts containing personal information about other players. This includes physical addresses, e-mail addresses, phone numbers, and inappropriate photos and/or videos.

Harassing or discriminatory language. This will not be tolerated.

Forums Code of Conduct

Report Post # written by

Reason
Explain (256 characters max)
Submit Cancel

Reported!

[Close]