dfxrick Voice
Joined: 26 Jan 2010 Posts: 4 Location: Alexandria, KY
|
Posted: Tue Jan 26, 2010 10:42 pm Post subject: Need help with authorization code |
|
|
basically after 60 mins i'd like it to remove the flag and unauth the person, but its not and i cant seem to see why its not, any ideas?
| Code: |
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."
}
}
}
}
|
_________________ www.tzirc.com check us out |
|