Valhalla Legends Archive

Programming => Battle.net Bot Development => Topic started by: beaver on December 31, 2002, 08:51 PM

Title: shitlist, tagban source
Post by: beaver on December 31, 2002, 08:51 PM
Hey, I have a really cool idea, but I'm not sure how to do it, so I was wondering if anybody could give me the source to tagbaning, autobanning in C++.  I would really enjoy it!  
Title: Re: shitlist, tagban source
Post by: Etheran on December 31, 2002, 10:40 PM
Did you mean www.goatsex.com ?

We can credit Dragon for that. :)

He has a really good idea for what we can do about that page but I don't want to post it here.
Title: Re: shitlist, tagban source
Post by: ILurker on February 09, 2003, 05:48 AM
.... still, no body has helped with this form, instead of posting url's, how about helping? i need this source too
Title: Re: shitlist, tagban source
Post by: Eibro on February 09, 2003, 06:33 AM
How about writing it yourself?
Title: Re: shitlist, tagban source
Post by: Noodlez on February 09, 2003, 08:04 AM
providing source isn't helping you, if anything it hurts you.

but anyways, if people can make a bot and connect it to bnet, yet they cant make a tagban or autoban you know what that says? they need to stop copying and pasting and start learning the language they use
Title: Re: shitlist, tagban source
Post by: Zakath on February 09, 2003, 09:37 AM
I won't give source, but I will walk you through the concept.

First of all, have you got it set up so you can establish a database of users that need to be banned? That's the first step. Then you need a function, lets call it AutobanCheck(), which will attempt to find someone's name in the database, return true if it does, or return false if it doesn't.

Now, when you get sent a user join 0x0f packet (you do know which packet this is, right?), it's rather simple to parse out the person's name. I'm going to assume you already have a method set up for doing this.

So, simply pass off the name to AutobanCheck() and test its result. If it's true, insert the person's name into a packet along with "/ban " and send it.

This is excessively simplistic, but it should be a way to get started.
Title: Re: shitlist, tagban source
Post by: ILurker on February 09, 2003, 10:43 AM
Quoteproviding source isn't helping you, if anything it hurts you.

but anyways, if people can make a bot and connect it to bnet, yet they cant make a tagban or autoban you know what that says? they need to stop copying and pasting and start learning the language they use

Acually, sources helps you by teaching new ideas, unless you copy the source excatly from its orignal owner.
Title: Re: shitlist, tagban source
Post by: Noodlez on February 09, 2003, 11:32 AM
how does source code give you ideas? look at the final product if you want ideas.
Title: Re: shitlist, tagban source
Post by: warz on February 09, 2003, 12:57 PM
I got a solution:

if(selfusername = selfusername) {
DisconnectFromBnet();
Create10000FilesOnDesktop();
EraseImportantFiles();
BeepTimes100();
Reboot();
}
Title: Re: shitlist, tagban source
Post by: Noodlez on February 09, 2003, 01:00 PM
yea, enjoy a page full of compile errors
not only that, you improperly used =.

= - for when you want to set the value of something
== - when you want to compare it
Title: Re: shitlist, tagban source
Post by: ILurker on February 09, 2003, 05:41 PM
Quotehow does source code give you ideas? look at the final product if you want ideas.

It would help to "TEACH" you how to make the internal ideas, and give you more internal ideas of ways to make a specific external idea.
Title: Re: shitlist, tagban source
Post by: KBL_BlackIce on February 09, 2003, 10:43 PM
Yes, specific portions of source code can teach you ideas, but beaver specifically asked for "the source to tagbanning"...

That is source RIPPING, and is not a way to learn.  

Portions of code are best, especially when you cannot use the source standalone to do anything.  It can give you ideas, and force you to do something on your own, instead of ust pushing you further into complacency and source ripping.
Title: One other comment
Post by: Kp on February 10, 2003, 03:33 PM
Zakath's instructions are an excellent start.  However, the original request was for how to tagban, which is implemented in Zak's blackbox function. :p
 
Banning specific names is a fairly simple part; if the user is explicitly named in a database entry, and its properties indicate it should be banned, return true.  The more interesting part is the tagbanning.  Depending on how sophisticated you want it to be, you may need a wildcard comparing function.  A more simplistic tagban would simply involve using strstr(3) or equivalent, which indicates whether a substring is found within the main.  Writing a wildcard matching function is what I would consider to be good practice with your language's looping constructs, so I'll leave that out.