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.

hi i need some help with limit tcl,

Old posts that have not been replied to for several years.
Locked
B
Bader
Voice
Posts: 35
Joined: Sat Mar 12, 2005 5:34 am

hi i need some help with limit tcl,

Post by Bader »

thats limit he changes the limit of channel vere 1mins,
pls i need help with this i wonna this limit change the limit vere 25 since
pls help me with this, and thanks, for all

##########################################################################
# Binds #
##########################################################################

bind time - "* * * * *" time:ChanLimit

##########################################################################
# time:ChanLimit start #
##########################################################################

proc time:ChanLimit {min hour day month year} {
foreach chan [channels] {
set newlimit [expr [llength [chanlist $chan]] + 5]
set currentlimit [currentlimit $chan]
if {$currentlimit < [expr $newlimit - 1] || $currentlimit > [expr $newlimit + 1]} {
putserv "mode $chan +l $newlimit"
}
}
}

##########################################################################
# time:ChanLimit end #
##########################################################################

##########################################################################
# currentlimit start #
##########################################################################

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

##########################################################################
# currentlimit end #
##########################################################################

##########################################################################
# putlog #
##########################################################################

putlog "Loaded ChanLimit (DLF)"
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

find:

Code: Select all

set newlimit [expr [llength [chanlist $chan]] + 5] 
and replace 5 with 25 (or what you wish) with something like like:

Code: Select all

set newlimit [expr [llength [chanlist $chan]] + 25] 
Once the game is over, the king and the pawn go back in the same box.
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

Post by De Kus »

bind time - "* * * * *" time:ChanLimit
...
if {$currentlimit < [expr $newlimit - 1] || $currentlimit > [expr $newlimit + 1]} {
these are the key triggers how often it will be changed.
every 25min isnt very easy, for every 30 min you could replace the timebind with:
bind time - "30*" time:ChanLimit
bind time - "00*" time:ChanLimit

for every 10min it would be:
bind time - "?0*" time:ChanLimit
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens...
Locked