Valhalla Legends Archive

Programming => Battle.net Bot Development => Topic started by: WiLD on July 08, 2003, 10:14 PM

Title: icons
Post by: WiLD on July 08, 2003, 10:14 PM
i was wondering how i would go about doing ipbanning. i tryed if icon_squelch then cleanslatebot2.send blah blah blah

but that doesnt work how can i make this work, like if the icon is something it does something.
Title: Re:icons
Post by: Eternal on July 09, 2003, 04:31 AM
I believe the only way you can IP ban is through squelching first...there is no other way of getting an IP address (unless in a game I think?)
Title: Re:icons
Post by: WiLD on July 09, 2003, 08:07 AM
yes i no that, mayb my question wasnt clear:
how would i do ipban?
i no it has to be something like if icon_squelch = true then
cleanslatebot2.send .......

but it doesnt work could you please help
Title: Re:icons
Post by: Eternal on July 09, 2003, 08:45 AM
You would check the users Flags. If they return the Squelch flag, then you would send your cleanslatebot2.send "/ban " & strUser command. I haven't really studied CSB, but I would expect there to be an event for returning a Flag.

I can't remember the flag for squelch, is it 20? <waits for someone who knows to help him out>
Title: Re:icons
Post by: ______ on July 09, 2003, 09:08 AM
put this on your join command

If flags = &H20 Then
cleanslatebot2.send "/ban " & username & " Ban Evasion Detected"
endif
Title: Re:icons
Post by: WiLD on July 09, 2003, 10:05 AM
isnt &H20 for hashes?
Title: Re:icons
Post by: Eternal on July 09, 2003, 10:20 AM
Looks like it was 20...
Title: Re:icons
Post by: Spht on July 09, 2003, 10:38 AM
Quote from: ______ on July 09, 2003, 09:08 AM
put this on your join command

If flags = &H20 Then
cleanslatebot2.send "/ban " & username & " Ban Evasion Detected"
endif


Note that would fail if the user has "plug" (0x10). You should be doing a bitmask comparison for this type of thing. Example:

If (flags and &H20) Then
Title: Re:icons
Post by: Eternal on July 09, 2003, 10:50 AM
Certainly a good idea.
btw Spht, I am still resisting the temptation to claim that EternalChat is a product of mine...it amuses me everytime someone asks.  ;D  Nice bot though...I'd be proud to say I coded it.
Maybe I could get the licence from you when you are old and bored  ;)