######################################## ### Trucs & astuces sur le canal ... ### ######################################## set derniertruc 0 bind time - * timer_truc proc timer_truc {a b c d e} { global derniertruc if {[expr [unixtime] - $derniertruc] < 175} { return 0 } foreach user [chanlist #aide -b] { if {[getchanidle $user #aide] < 3} { return 0 } } set nombre [rand [exec wc trucs.txt | sed -e "s/ *//" | sed -e "s/ .*//"]] set truc [string range [exec cat -n trucs.txt | grep " $nombre" | head -1] 7 end] set derniertruc [unixtime] putbot Aide "msg #Aide *** Trucs & Astuces #Aide *** -> $truc" }