TCL - Channel Limiter

Otomatis ngeset limit channel +10 tiap menit

bind time - "* * * * *" Chan:Limit
proc Chan:Limit {min hour day month year} {
 foreach chan [channels] {
  set newlimit [expr [llength [chanlist $chan]] + 10]
  set currentlimit [currentlimit $chan]
  if {$currentlimit < [expr $newlimit - 1] || $currentlimit > [expr $newlimit + 1]} {
   putquick "mode $chan +l $newlimit"
  }
 }    
}

proc currentlimit {chan} {
 set currentmodes [getchanmode $chan]
 if {[string match "*l*" [lindex $currentmodes 0]]} {
  return [lindex $currentmodes end] 
 }
 return 0
}

Add comment

Fill out the form below to add your own comments

User data





Add your comment