View Single Post
02-18-15, 02:10 PM   #6
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,327
I had assumed that it would require guild leader to check permissions, but apparently, that's only to set them. The code below should work.

Lua Code:
  1. local _,_,rank=GetGuildInfo("player");--    Get our rank ID (0-based index)
  2. GuildControlSetRank(rank+1);--  Set rank ID to check (1-based index)
  3. local _,_,listen,speak=GuildControlGetRankFlags();--    Get permission flags
  4.  
  5. if listen and speak then
  6. --  Do stuff
  7. end


PS: Blizzard made a change recently that converted all functions that return 1/nil to boolean.
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)

Last edited by SDPhantom : 02-18-15 at 02:15 PM.
  Reply With Quote