• Welcome to Valhalla Legends Archive.
 

shitlist, tagban source

Started by beaver, December 31, 2002, 08:51 PM

Previous topic - Next topic

beaver

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!  

Etheran

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.

ILurker

#2
.... still, no body has helped with this form, instead of posting url's, how about helping? i need this source too

Eibro

#3
How about writing it yourself?
Eibro of Yeti Lovers.

Noodlez

#4
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

Zakath

#5
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.
Quote from: iago on February 02, 2005, 03:07 PM
Yes, you can't have everybody...contributing to the main source repository.  That would be stupid and create chaos.

Opensource projects...would be dumb.

ILurker

#6
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.

Noodlez

#7
how does source code give you ideas? look at the final product if you want ideas.

warz

#8
I got a solution:

if(selfusername = selfusername) {
DisconnectFromBnet();
Create10000FilesOnDesktop();
EraseImportantFiles();
BeepTimes100();
Reboot();
}

Noodlez

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

ILurker

#10
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.

KBL_BlackIce

#11
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.

Kp

#12
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.
[19:20:23] (BotNet) <[vL]Kp> Any idiot can make a bot with CSB, and many do!