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 

opcheck proc is wrong

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    egghelp.org community Forum Index -> Archive
View previous topic :: View next topic  
Author Message
eiSi
Halfop


Joined: 07 Mar 2002
Posts: 70

PostPosted: Sun Mar 09, 2003 8:01 am    Post subject: opcheck proc is wrong Reply with quote

hi there!

I am coding an opcheck function, which basically worked fine for me:

Code:
### opcheck proc
proc call_opcheck {nick hand chan misc1 misc2} {
        global priv botnick home lbn hub
        set line ""
        set intiv ""
        msg $home "\002Op Check\002 Command Issued, if nothing returned, all ok! "
        foreach channel [channels] {
                set lchannel [string tolower $channel]
                if { [botisop $channel ] == 0 } {
                        msg $home "$channel"
                        msg $channel "\002Warning:\002 I am not opped, please op me, otherwise I'll part."
                        set misc2 "timer 3 call_opcheck2"
                        call_opcheck2 $nick $handle $chan $misc1 $misc2
                }
        }
}

### opcheck2 proc
proc call_opcheck2 {nick hand chan misc1 misc2} {
        killtimer $misc2
        if { [botisop $chan ] == 0 } {
                msg $chan "You still haven't opped me, I'll part now..."
                msg $home "Parting $chan (Opcheck failed)"
                channel remove $chan
        }
}


what isn't working, is the thing with the timer.
I want the bot to start a timer (3 minutes for example) then check again if it is opped. If not, it should part.

what is wrong with my proc? Oh and I am not that good at tcl coding,... yet Wink

thanks for any help!
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    egghelp.org community Forum Index -> Archive 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