The Repeat Kicker can be done in several ways. The general idea is to somehow store what a person last said and then the next time they speak see if what they said was what they said last time. I like to use variables to record this information however some people may not like to do that because it could take up a lot of space. Anyway, here is some code: and last one is with changing of modes
ON @*:TEXT:*:#:{
IF ($nick isop # ) { RETURN }
VAR %text = $hash($strip($1-),32)
IF ($len($strip($1-)) >= 10 ) {
;this 10 will ignore words like laught out loud brb etc.
VAR %old.text = %rp. [ $+ [ $chan ] $+ . $+ [ $nick ] ]
VAR %old.text = $deltok(%old.text,1,46) }
IF ((%rp. [ $+ [ $chan ] $+ . $+ [ $nick ] ] == $null) || (%old.text != %text)) {
; If the person didn't repeat or the person spoke for the
; first time then we need to create this variable:
SET -u790 %rp. [ $+ [ $chan ] $+ . $+ [ $nick ] ] 1. $+ %text
; Note how its set to unset in 10 seconds - so the person has to repeat within 10seconds
; The variables format is: %rp.#channel.nickname N.%text
; N being the number of times the %text was said
RETURN
}
VAR %temp = %rp. [ $+ [ $chan ] $+ . $+ [ $nick ] ]
VAR %count = $gettok(%temp,1,46)
INC %count
SET -u90 %rp. [ $+ [ $chan ] $+ . $+ [ $nick ] ] %count $+ . $+ %text
IF (%count >= 2) {
echo -at 5 $nick 4 is repeating upper line in the Channel 3 %count Times in 2 mins.
IF (%count >= 7) {
echO -at notice 9,1 $nick : Repeating 3 %count times! $1-
mode # +b $address($nick,4) | kick # $nick 4No Repeating/Flooding.4Banned..
}
}
}
ON @*:text:*:#:{
IF ($nick isop # ) { RETURN }
VAR %text = $hash($strip($1-),32)
IF ($len($strip($1-)) >= 9 ) {
;this 10 will ignore words like laught out loud brb etc.
VAR %old.text = %rp. [ $+ [ $chan ] $+ . $+ [ $nick ] ]
VAR %old.text = $deltok(%old.text,1,46) }
IF ((%rp. [ $+ [ $chan ] $+ . $+ [ $nick ] ] == $null) || (%old.text != %text)) {
; If the person didn't repeat or the person spoke for the
; first time then we need to create this variable:
SET -u940 %rp. [ $+ [ $chan ] $+ . $+ [ $nick ] ] 1. $+ %text
; Note how its set to unset in 10 seconds - so the person has to repeat within 10seconds
; The variables format is: %rp.#channel.nickname N.%text
; N being the number of times the %text was said
RETURN
}
VAR %temp = %rp. [ $+ [ $chan ] $+ . $+ [ $nick ] ]
VAR %count = $gettok(%temp,1,46)
INC %count
SET -u90 %rp. [ $+ [ $chan ] $+ . $+ [ $nick ] ] %count $+ . $+ %text
IF (%count >= 3) {
echo -at 5 $nick 4 is repeating upper line in the Channel # 3 %count Times in 2 mins.
IF (%count >= 3) {
echO -at notice 9,1 $nick : Repeating 3 %count times in $chan !
IF (%count >= 4) {
.mode # +f *5:2
IF (%count >= 5) {
.timer 1 2 mode $active +b $address($_ip:nick,2) | .timer 1 2 kick # $nick 4No Repeating/Flooding.4Banned
}
}
}
}
}
Yes, then there's no leftover vars from the set -u60 if mIRC crashes - hashes just clear.