What"s the problem in this code ?
#*/ idle max */
set idle(max) "2"
bind raw - 317 event:idle
proc event:idle {from keyword text} {
global idle
set idle(sec) [expr $idle(max) / 60]
if {$idle(sec) > $idle(max)} {
foreach channel [channels] {
if {[onchan $nick $channel]} {
putserv "NOTICe $nick :You have too much IDLE ($idle(secs) secondes)"
putserv "MODE $channel -o $nick" } } } }
bind time -|- "00 * * * *" event:idlelook
bind time -|- "01 * * * *" event:idlelook
bind time -|- "02 * * * *" event:idlelook
bind time -|- "03 * * * *" event:idlelook
bind time -|- "04 * * * *" event:idlelook
bind time -|- "10 * * * *" event:idlelook
bind time -|- "15 * * * *" event:idlelook
bind time -|- "20 * * * *" event:idlelook
bind time -|- "25 * * * *" event:idlelook
bind time -|- "30 * * * *" event:idlelook
bind time -|- "35 * * * *" event:idlelook
bind time -|- "40 * * * *" event:idlelook
bind time -|- "45 * * * *" event:idlelook
bind time -|- "50 * * * *" event:idlelook
bind time -|- "55 * * * *" event:idlelook
proc event:idlelook { min hour day month year } {
global botnick
foreach channel(list) [channels] {
foreach user(list) [chanlist $channel(list)] {
putlog "[chanlist $channel(list)]"
if {[isop $user(list) $channel(list)]} {
putserv "WHOIS $user(list)" ; putlog "looking idle " ; return 0 } } } }