• Welcome to Valhalla Legends Archive.
 

[Solved] Simple: How to detect that I'm banned from channel?

Started by Don Cullen, July 21, 2006, 04:18 PM

Previous topic - Next topic

Don Cullen

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.
Regards,
Don
-------

Don't wonder why people suddenly are hostile when you treat them the way they shouldn't be- it's called 'Mutual Respect'.

topaz

Set your bot to join the product-specified channels, and then send a join to your channel.
RLY...?

Don Cullen

So in short, there's no way to detect being banned upon directly entering the default channel?
Regards,
Don
-------

Don't wonder why people suddenly are hostile when you treat them the way they shouldn't be- it's called 'Mutual Respect'.

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.

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.

Don Cullen

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?
Regards,
Don
-------

Don't wonder why people suddenly are hostile when you treat them the way they shouldn't be- it's called 'Mutual Respect'.

Spht

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.

Don Cullen

In other words, no easy way to do it. Thanks.
Regards,
Don
-------

Don't wonder why people suddenly are hostile when you treat them the way they shouldn't be- it's called 'Mutual Respect'.

Hero


Don Cullen

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.
Regards,
Don
-------

Don't wonder why people suddenly are hostile when you treat them the way they shouldn't be- it's called 'Mutual Respect'.