This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

check for a fixed repeated text

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
s
simo
Revered One
Posts: 1115
Joined: Sun Mar 22, 2015 2:41 pm

check for a fixed repeated text

Post by simo »

Greetings ,

i was testing this tcl to check for a fixed text that has been repeated and start counting only if the repeats (incr) comes from different IPs and ignore if the repeat comes from only 1 IP

Code: Select all


bind pubm - * Check:Chan

proc Check:Chan {nick uhost hand chan text} {
     set chan [string tolower $chan]

     set text [string map [list \017 ""] [stripcodes abcgru $text]]
    
     if {![string match -nocase "*some fixed text*" $text]} { return 0 }



      set RLyCheck 4:2

    global relaychk 

    if {![info exists relaychk([set QfQ $chan:$text])]} { set relaychk($QfQ) 0 }

     after [expr {[lindex [split $RLyCheck :] 1]*1000*1}] [list incr relaychk($QfQ) -1]

       incr relaychk($QfQ)

       if {$relaychk($QfQ) >= [lindex [split $RLyCheck :] 0] && $relaychk($QfQ) < 10} {  pushmode $chan +m  }
}

im kinda stuck how to achieve that, perhaps someone has a solution for this, thanks in advance.
Last edited by simo on Sun Dec 08, 2024 10:56 am, edited 5 times in total.
s
simo
Revered One
Posts: 1115
Joined: Sun Mar 22, 2015 2:41 pm

Re: check for a fixed repeated text

Post by simo »

Any help would be appreciated.
s
simo
Revered One
Posts: 1115
Joined: Sun Mar 22, 2015 2:41 pm

Re: check for a fixed repeated text

Post by simo »

it must be an extremely complex task to do as everyone i have asked so far has no clue how to achieve this.

i guess i have to use what we have in place currently wich doesnt check for repeated text but checks the text lines regardless of repeats wich is not ideal for us.
Post Reply