Thread Tools Display Modes
02-22-10, 07:58 PM   #1
Calina
A Defias Bandit
 
Calina's Avatar
Join Date: Feb 2010
Posts: 3
Channel mass unmod possible ?

Title says it, you think its possible to setup an addon which gets playernames from ListChannelByName(channelName) and executes an unmod on each player in the channel ?

We got a little problem with a player made lfg channel and need to unmod all non-channel admins.


I'm not that skilled with writing addons - just wanted to get some opinions if this is possible
  Reply With Quote
02-22-10, 08:22 PM   #2
Shadowed
...
Premium Member
Featured
Join Date: Feb 2006
Posts: 387
It should be possible, but a bit of a pain to do. It's been a while since I've played with channel moderation APIs but you'd need to do something like this:

1) Request user list for a channel
2) Register event that indicates the channel list has been received
3) Parse the list and find anyone with moderator
4) Demote them
  Reply With Quote
02-22-10, 08:35 PM   #3
Calina
A Defias Bandit
 
Calina's Avatar
Join Date: Feb 2010
Posts: 3
Thanks for the answer, I think I can skip step 3 - I want to demote everyone except me (i'm owner)

but still sounds painful :P
  Reply With Quote
02-22-10, 09:16 PM   #4
Calina
A Defias Bandit
 
Calina's Avatar
Join Date: Feb 2010
Posts: 3
i simply want to run an /unmod <channelname> on all players in the channel :3

Normally I'd go for a table instead of the player name
ChannelUnmoderator(channelname, <table with players>)
I just want to get rid of the unflagged moderators in my channel (yay blizz for bugged channel rights display) so i dont care about muted persons and visible moderators that are flagged with # and *

so i'd need to get my ListChannelByName output into a table and the table into my ChannelUnmoderator line and hope that the command allows tables o.o

gah, I ran out of ideas at the moment :<
thanks for the moment, if anyone got an idea... would be nice

Last edited by Calina : 02-22-10 at 09:50 PM.
  Reply With Quote
02-23-10, 04:27 AM   #5
Amethyst
A Fallenroot Satyr
 
Amethyst's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2006
Posts: 20
The lua command ChannelUnmoderator("channel", "name") doesn't accept a table as a parameter.

However, the command ListChannelByName(channelName) also returns a nil value and doesn't give you a table anyway. Wowwiki says that the command displays the users in that channel to your chatlog, rather than returning any useful data within your mod.

To capture the data, you need to register your mod to capture the CHAT_MSG_CHANNEL_LIST event.

edit:
you might also find the following discussion useful:
http://www.warcraftstrategy.com/wow/...t-channel.html

Last edited by Amethyst : 02-23-10 at 04:29 AM.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Channel mass unmod possible ?


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off