| View previous topic :: View next topic |
| Author |
Message |
Lucifer Voice
Joined: 01 Nov 2006 Posts: 17
|
Posted: Wed Aug 12, 2009 1:17 pm Post subject: Devoice on repeats |
|
|
| hey can anybody help me with script to devoice ppl on repeats msg/actions ??? |
|
| Back to top |
|
 |
TCL_no_TK Owner

Joined: 25 Aug 2006 Posts: 509 Location: England, Yorkshire
|
Posted: Sat Aug 22, 2009 6:19 pm Post subject: |
|
|
Please use Sir_Fz's code below thnx _________________ TCL the misunderstood
Last edited by TCL_no_TK on Sun Aug 30, 2009 10:47 am; edited 2 times in total |
|
| Back to top |
|
 |
Lucifer Voice
Joined: 01 Nov 2006 Posts: 17
|
Posted: Thu Aug 27, 2009 4:38 pm Post subject: |
|
|
Thanks mate, but got an error can u fix it please...
Tcl error [pubm:repeat_devoice]: expected boolean value but got "" |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Thu Aug 27, 2009 6:10 pm Post subject: |
|
|
Try
| Code: | # repeats:seconds
set nrepeats 3:2
bind pubm - * devoice:repeats
bind ctcp - ACTION devoice:repeats
proc devoice:repeats {nick uhost hand chan arg {arg2 ""}} {
global nrepeats
if {![validchan $chan] || ![isvoice $nick $chan]} {return}
if {$arg2 != ""} {
set arg $arg2
}
foreach {o s} [split $nrepeats :] {break}
set arg [md5 $nick:$uhost:$chan:[stripcodes bcruag $arg]]
if {[flooded $arg $s $o]} {
pushmode $chan -v $nick
}
}
proc flooded {id s o} {
global flooded
if {![info exists flooded($id)]} {
set flooded($id) 0
utimer $s [list unset flooded($id)]
}
expr {[incr flooded($id)] >= $o}
} |
_________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
| Back to top |
|
 |
TCL_no_TK Owner

Joined: 25 Aug 2006 Posts: 509 Location: England, Yorkshire
|
Posted: Fri Aug 28, 2009 6:44 am Post subject: |
|
|
thnx Fz
@Lucifer will take a while before i can test the script, but ive already loaded it up and got the same error message, so it'll fix it over the weekend if i get the time. _________________ TCL the misunderstood |
|
| Back to top |
|
 |
|