Sort of a anti-repeat script. Whenever someone repeats a text more than 3 times, it will "ignore" that person's text until he or she say's something else.
To install, put this scripts in your Remote Scripts (Alt R), and
lala! You are now safe from repetitive spam.
;Anti-Repeat
;First made by BlueThen on March 4, 2008.
;Last updated on March 15, 2008.
;To install, put this scripts in your Remote Scripts (Alt R), and
;lala! You are now safe from repetitive spam.
on ^*:text:*:*: {
if ($readini(logs.ini,$nick,last) == $1-) {
if ($readini(logs.ini,$nick,warns) == $null) {
writeini -n logs.ini $nick warns 0
}
writeini -n logs.ini $nick warns $calc($readini(logs.ini,$nick,warns) + 1)
if ($readini(logs.ini,$nick,warns) >= 3) {
if ($readini(logs.ini,$nick,warns) == 3) {
.echo -mt Halted text from: $nick for repetitive text.
}
haltdef
}
}
if ($readini(logs.ini,$nick,last) != $1-) {
writeini -n logs.ini $nick warns 0
}
writeini -n logs.ini $nick last $1-
}
Oh my bad. I thought you were laughing when you said that...I should have read your whole sentence closely. :p
This should do it:
on @*:text:*:#:{
var %e = lol|lm(ao|fao)|haha
if (!$nick(#,$nick,oh)) && (!$regex($1-,/( $+ %e $+ )/iS)) {
if ($readini(logs.ini,$nick,last) == $strip($1-)) {
if ($readini(logs.ini,$nick,warns) == $null) {
writeini -n logs.ini $nick warns 0
}
writeini -n logs.ini $nick warns $calc($readini(logs.ini,$nick,warns) + 1)
if ($readini(logs.ini,$nick,warns) == 4) {
.kick $chan $nick Repetitive messages
}
}
if ($readini(logs.ini,$nick,last) != $strip($1-)) {
writeini -n logs.ini $nick warns 0
}
writeini -n logs.ini $nick last $strip($1-)
}
}
To keep the script from triggering upon ops and halfops, add this under the text event:> on @:text::#:{
if (!$nick(#,$nick,oh)) {
if ($readini(logs.ini,$nick,last) == $1-) {
if ($readini(logs.ini,$nick,warns) == $null) {
writeini -n logs.ini $nick warns 0
}
writeini -n logs.ini $nick warns $calc($readini(logs.ini,$nick,warns) + 1)
if ($readini(logs.ini,$nick,warns) == 4) {
.kick $chan $nick Repetitive messages
}
}
if ($readini(logs.ini,$nick,last) != $1-) {
writeini -n logs.ini $nick warns 0
}
writeini -n logs.ini $nick last $1-
}
}> it wont kick people for repeatingI'm not sure what you mean by that. That is the purpose of this so-called "anti-repeat" script.
hi BlueThen, I'm using this in the way Cheiron wanted it, as a flood gate, but is there anyway to have it so it doesn't kick ops and half-ops, and that it wont kick people for repeating lol, lmao, lmfao and haha, and other stuff like that, thank you, great script btw
this is the current script I am using.
on *:text:*:#: {
if ($readini(logs.ini,$nick,last) == $1-) {
if ($readini(logs.ini,$nick,warns) == $null) {
writeini -n logs.ini $nick warns 0
}
writeini -n logs.ini $nick warns $calc($readini(logs.ini,$nick,warns) + 1)
if ($readini(logs.ini,$nick,warns) == 4) {
.kick $chan $nick Repetitive messages
}
}
if ($readini(logs.ini,$nick,last) != $1-) {
writeini -n logs.ini $nick warns 0
}
writeini -n logs.ini $nick last $1-
}
thanks again - Micheál.
Glad you liked it!
If you want to make it more channel oriented, you can change
if ($readini(logs.ini,$nick,warns) >= 3) {
if ($readini(logs.ini,$nick,warns) == 3) {
.echo -mt Halted text from: $nick for repetitive text.
}
haltdef
}
into
if ($readini(logs.ini,$nick,warns) == 3) {
.kick $chan $nick Repetitive messages
}
Replace 3 with whatever number you want. The lower it is, the more harsh the bot is.
Then change the first line of the code into
on *:text:*:#channel: {
Replace #channel with whatever channel you like.
question for you Blue Then.. could you do an update or let me know what to edit as this has more than just a personal setting that has me interested.. this could be a very effective anti-flood for a channel. i been looking for something similiar for a while.. this is getting a 7 straight up from me. nice job as always