This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Need help with authorization code

Help for those learning Tcl or writing their own scripts.
Post Reply
d
dfxrick
Voice
Posts: 4
Joined: Tue Jan 26, 2010 10:40 pm
Location: Alexandria, KY
Contact:

Need help with authorization code

Post by dfxrick »

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: Select all

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
Post Reply