16 Aralık 2007, 21:54
#5 Çevrimdışı
Kullanıcıların profil bilgileri misafirlere kapatılmıştır.
Cevap: Tcl Arşivi
Kanal Limit
PHP Kod: Kodu kopyalamak için üzerine çift tıklayın!
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # 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 ]] + 15 ] 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 "mirchane.com chanlimit"