Valhalla Legends Forums Archive | Battle.net Bot Development | [Solved] Simple: How to detect that I'm banned from channel?

AuthorMessageTime
LockesRabb
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.
July 21, 2006, 9:18 PM
Topaz
Set your bot to join the product-specified channels, and then send a join to your channel.
July 21, 2006, 9:50 PM
LockesRabb
So in short, there's no way to detect being banned upon directly entering the default channel?
July 21, 2006, 9:55 PM
HeRo
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.
July 22, 2006, 12:34 AM
Spht
Sounds like you're using SID_JOINCHANNEL 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.
July 22, 2006, 12:40 AM
LockesRabb
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?
July 22, 2006, 1:54 PM
Spht
[quote author=Kyro link=topic=15427.msg155966#msg155966 date=1153576471]
Is there any way to be able to tell whether the user has been banned from channel[/quote]

Yes, I already explained that.

[quote author=Kyro link=topic=15427.msg155966#msg155966 date=1153576471]or whether the channel (if its a clan channel) has been set to private?[/quote]

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.
July 22, 2006, 3:29 PM
LockesRabb
In other words, no easy way to do it. Thanks.
July 22, 2006, 3:45 PM
HeRo
Actually it's pretty easy.
July 23, 2006, 3:55 AM
LockesRabb
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.
July 23, 2006, 4:12 AM

Search