Valhalla Legends Archive

Programming => Battle.net Bot Development => Topic started by: Yegg on September 19, 2004, 01:00 PM

Title: Bad Words.
Post by: Yegg on September 19, 2004, 01:00 PM
I was wondering if ne1 could help show me what to do to stop people from trying to make an account that contains words that are marked as "bad". Like when ur using the actual game client if u type in fuck or blizzard or update, it considers it a bad word, i've gotten my bot to recognize some words but it makes them case sensative, and this wouldn't help. does ne1 know the proper way to go about doing this?
Title: Re:Bad Words.
Post by: Newby on September 19, 2004, 01:16 PM
Battle.net will send you a response back if you try to create an account with an illegal word in it. So you don't have to. ;)
Title: Re:Bad Words.
Post by: BaDDBLooD on September 19, 2004, 01:21 PM
You recieve a Byte in 0x3D, the value for Banned word is "3"
Title: Re:Bad Words.
Post by: Laff on September 19, 2004, 02:52 PM
although it does send you back an error code, if you wanted to check it client side before sending all you have to do is either lcase or ucase both comparisons to make it case insensitive.

ie: let's say you want to censor "blah" and all of it's variants - some psuedocode would look like this -

if (lcase(pw) == "blah")
  fail();
else
  success();

that way it would lcase "BlAh" or "Blah" or "bLAH" or whatever and compare it to "blah".  hope this helps in future problems if you run into them again.
Title: Re:Bad Words.
Post by: Yegg on September 19, 2004, 03:31 PM
lol, sorry but my bot runs off csb, i wusn't thinking about the server automatically bringing back a response, if i used bnls or something like that, but im gonna use the lcase commands, hopefully that'll fix the problem.
Title: Re:Bad Words.
Post by: tA-Kane on September 19, 2004, 09:07 PM
Quote from: Yegg on September 19, 2004, 03:31 PMmy bot runs off csb, i wusn't thinking
Best quote ever.
Title: Re:Bad Words.
Post by: DeTaiLs on September 19, 2004, 09:26 PM
lol i had soda in my mouth when i read that now i need to clean off my screen and keyboard
Title: Re:Bad Words.
Post by: Newby on September 19, 2004, 10:58 PM
Quote from: tA-Kane on September 19, 2004, 09:07 PM
Quote from: Yegg on September 19, 2004, 03:31 PMmy bot runs off csb, i wusn't thinking
Best quote ever.
You kick ass. Your title should be "Master of taking things out of context". ;)

EDIT -- <3
Title: Re:Bad Words.
Post by: Dyndrilliac on September 20, 2004, 11:03 AM
Quote from: Laff on September 19, 2004, 02:52 PM
although it does send you back an error code, if you wanted to check it client side before sending all you have to do is either lcase or ucase both comparisons to make it case insensitive.

ie: let's say you want to censor "blah" and all of it's variants - some psuedocode would look like this -

if (lcase(pw) == "blah")
  fail();
else
  success();

that way it would lcase "BlAh" or "Blah" or "bLAH" or whatever and compare it to "blah".  hope this helps in future problems if you run into them again.

That's not neccessary.
If InStr(UsernameVariableHere, "BadWordHere") <> 0 Then Exit Sub
Title: Re:Bad Words.
Post by: Stealth on September 20, 2004, 06:14 PM
You should pass the vbTextCompare argument to InStr if you want to ignore case. vbBinaryCompare, the default, IS case-sensitive.
Title: Re:Bad Words.
Post by: Blaze on September 21, 2004, 04:04 PM
Quote from: tA-Kane on September 19, 2004, 09:07 PM
Quote from: Yegg on September 19, 2004, 03:31 PMmy bot runs off csb, i wusn't thinking
Best quote ever.

Shouldn't it be

my bot runs off csb, i wusn't thinking...

So people know he didn't finish his sentance there?
Title: Re:Bad Words.
Post by: tA-Kane on September 22, 2004, 11:57 AM
Quote from: Kk)Blaze(kK on September 21, 2004, 04:04 PM
Quote from: tA-Kane on September 19, 2004, 09:07 PM
Quote from: Yegg on September 19, 2004, 03:31 PMmy bot runs off csb, i wusn't thinking
Best quote ever.
Shouldn't it be

my bot runs off csb, i wusn't thinking...

So people know he didn't finish his sentance there?
If you want to do it that way, then it would be like this:

Quote...my bot runs off csb, i wusn't thinking...

It was not only not the end of the sentence, but not the beginning either.

/me stops useless chatter on this subject