View Single Post
04-04-12, 12:48 AM   #5
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 1,060
As far as I can tell none of these channel events actually fire for my trial account, so I can't say if any of this actually works, but I'm going to leave it here anyway.

There's an event called CHANNEL_COUNT_UPDATE that supposedly returns the id of the channel and the number of members.

So all you should need to do is check if the channel is the one you want to watch, loop through the members and collect their info.

Lua Code:
  1. local f = CreateFrame("frame")
  2. f:RegisterEvent("CHANNEL_COUNT_UPDATE")
  3. f:SetScript("OnEvent", function(self,event,id,count)
  4.     local channel = GetChannelDisplayInfo(id)
  5.     if channel ~= "iron" then return end
  6.     for i=1,count do
  7.         local name = GetChannelRosterInfo(id,i)
  8.         -- str:SetText(name) or something
  9.     end
  10. end)

I think class colors are going to be more trouble than they're worth for this particular venture, but you could store a table of [names] = class whenever you get the opportunity to collect them.
  Reply With Quote