egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Need help with authorization code

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
dfxrick
Voice


Joined: 26 Jan 2010
Posts: 4
Location: Alexandria, KY

PostPosted: Tue Jan 26, 2010 10:42 pm    Post subject: Need help with authorization code Reply with quote

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
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber