How do I detect that I'm banned from a channel upon connecting to bnet and attempting to join the default channel?
All my bot says is that ive been redirected to the channel The Void... My apologies if this seems too simplish. Thanks in advance for any and all assistance.
Set your bot to join the product-specified channels, and then send a join to your channel.
So in short, there's no way to detect being banned upon directly entering the default channel?
When you enter bnet, if your banned from a channel it should say you are (EID_ERROR or EID_INFO), and if you still try to enter the channel I'm guessing it would only make sense to send you into the void.
Sounds like you're using SID_JOINCHANNEL (http://bnetdocs.valhallalegends.com/content.php?Section=m&Code=34) force join which will always put you in a channel even if the one you supplied isn't accessible. This is what the actual Blizzard clients use to get you in chat.
Use what Bnetdocs calls "no-create join" and you will get EID_CHANNELFULL / EID_CHANNELDOESNOTEXIST / EID_CHANNELRESTRICTED back appropriately if the channel is inaccessible.
Send a text join and you will also get back appropriate errors as EID_ERROR, from which you can determine if the reason is a ban.
I get back 'channel is restricted'. Is there any way to be able to tell whether the user has been banned from channel, or whether the channel (if its a clan channel) has been set to private?
Quote from: Kyro on July 22, 2006, 08:54 AM
Is there any way to be able to tell whether the user has been banned from channel
Yes, I already explained that.
Quote from: Kyro on July 22, 2006, 08:54 AMor whether the channel (if its a clan channel) has been set to private?
Yes, you get "You do not have permission to view that channel." error instead of "(If you are trying to search for a user, use the /whois command.)" when you try to /who a private channel.
In other words, no easy way to do it. Thanks.
Actually it's pretty easy.
I meant using the force channel enter packet. I was using &H2, but since that doesn't return an error, I had to switch to normal channel enter packet so I could trap the error. I dislike using the normal packet mainly because if a channel is empty, I want it to be created automatically like it does with &H2. It's okay, I set up code to trap the nonexistent channel error so it'd automatically send a force channel join packet to create the channel. Just wanted to do it in one shot instead of two.