WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   AddOn Search/Requests (https://www.wowinterface.com/forums/forumdisplay.php?f=6)
-   -   Channel List addon (https://www.wowinterface.com/forums/showthread.php?t=43172)

cormanthor 04-03-12 03:58 PM

Channel List addon
 
My wife and I are starting the IronMan Challenge, and as such, we typically don't have a guild to keep up with our fellow challengers. Thus we've been using the "iron" channel.

I'm looking for an addon that lists the members of a chat channel. I would like for it to display the list non-interactively on the screen, updating periodically (theoretically with every "joined"/"left" in the channel).

Any help would be awesome!

Seerah 04-03-12 04:07 PM

Just to clarify, something other than the slash command, yes?

cormanthor 04-03-12 09:55 PM

Yes, definitely. I am looking for a list of names, preferably class colored (optional), in a frame with no background/border. The frame should be click-through so as not to interfere with gameplay. The overall effect would be to duplicate /chatlist without the visible interactive frame.

I have something similar already up and running for my RealID friends. It's basically the same system, except the method for handling ListChannelByName() is beyond my current coding experience.

I can handle frame creation / placement / font / etc., but the method for getting the data, awaiting the return of separate events, filtering out the data from the events, and storing that in a non-duplicated array while not making boat-loads of garbage is over my head slightly.

So if I could get some event handler / info storage function(s), that would probably be enough.

Phanx 04-03-12 10:03 PM

You can do this, more or less, with the default UI. Open the channels frame (there's a tab for it at the bottom of the friends frame) and click the speaker icon next to the channel name to enable voice chat for the channel. It doesn't matter if you're actually using voice chat, just that it's enabled. You might need to be the channel leader or a channel moderator to enable voice chat for it. Once voice chat is enabled for the channel, you can click on the channel name and drag it out of the window to open a pullout window listing the people in the channel.

I did not test this with other players in the channel, though, so it may only show people who have voice chat enabled. If someone is reluctant to enable voice chat, they should be able to do so without any visible (or audible!) effect by turning voice chat on, and then turning the microphone off, turning the mode to "voice activated" (so there's no key bound to push-to-talk), and setting the voice volume to zero.

If you still want an addon for it, take a look in ChannelFrame.lua to see the functions that handle updating the pullout roster frame in the default UI.

semlar 04-04-12 12:48 AM

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.

cormanthor 04-04-12 03:25 AM

Thank you. I'll give both of these options a try later today. I must have missed GetChannelRosterInfo entirely when I went through the channel functions over the weekend.


All times are GMT -6. The time now is 04:16 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI