ID:267982
Jan 24 2004, 6:58 pm
|
|
I need help to make a code that auto mutes spammers.
|
Jan 24 2004, 7:01 pm
|
|
Well, depends on what you consider spamming. I consider it repetitively saying the same sentence or garbled words over and over...In that case, just record their last sentence in a variable, and then compare it to the new sentence, and if it matches mute/boot/ban or what ever you wish to do to them...
|
In response to Goku72
|
|
yeah, thats what i consider spamming. so can u give me an example.
|
In response to Buster Lee
|
|
That example right there should do what you want. It's pretty basic though, but you can build on it using the same concepts.
mob |
In response to Goku72
|
|
There are various problems with that.
First, and most importantly, you're saving what everyone has said in a list. That's going to get REALLY, REALLY big later on. Second, if someone logs out before they get unmuted, they NEVER gets unmuted, unless if they spam again. Third, you're giving him a code snippet, which he will immediately plug into his code, will have no clue what it does, and will later come asking how to change something. To fix the first problem, you simply have a counter which increases after every message, and reduce it based on the time since the last message, which you determine using world.realtime. If it's too high, then you block the message. To fix the second problem, you use the above method. To fix the the third problem, you tell him WHAT to do, you don't hand him something similar to what he's asking for on a silver platter. |