Can someone please help me out with this code? I'm having problems finding out why its not working. I dont see it. after 60 minutes of idle its supposed to remove the authflag, and it isn't, can anyone please help with this problem. u can find me on #fam or #tzirc on efnet. Please help me out. Thanks!!!
proc auth_idle {} {
global _auth authflag
set idletime 1
set chans [channels]
set chan_tot [llength $chans]
set chan_num 0
for {set loop 0} {$loop < $chan_tot} {incr loop} {
set nicks [chanlist [lindex $chans $loop] $authflag]
set nickidle 1
set nick_tot [llength $nicks]
for {set loop2 0} {$loop2 < $nick_tot} {incr loop2} {
set idletime [getchanidle [lindex $nicks $loop2] [lindex $chans $loop]]
if {$idletime >= $nickidle} {set nickidle $idletime}
if {($idletime > 60)} {
set nick [lindex $nicks $loop2]
set hand [nick2hand [lindex $nicks $loop2]]
if {[hand2idx $hand] == -1} {
putlog "$nick Idle over 60 minutes. Deauthenticated."
chattr $hand "-${authflag}"
putserv "NOTICE $nick :Idle over 60 minutes. Deauthenticated."
}
}
}
}