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.

[xx.xx] joined #testchan but didn't want to!

Old posts that have not been replied to for several years.
Locked
n
nso
Voice
Posts: 19
Joined: Fri Apr 25, 2003 4:45 pm

[xx.xx] joined #testchan but didn't want to!

Post by nso »

Hi.

Im currently making what's going to be a part of a chanfix-system, and have run into a small problem with some of the TCL.

I'm trying to join a channel, execute commands/checks and then part channel.
At first I thought this problem had something to do with the code beeing parsed too quickly, but changed my belifes when I put the sequences into different timers, and the same error occured.

It seems to me that the eggdrop ignores the tiemr and executes the part/channel remove at once..

Do any of you know how I could resolve this issue?

- nso


here is a stripped down exampleversion of what i'm trying to do, the only thing I have removed is the actions which are to be executed.. non-important stuff

Code: Select all

bind pub * !fix chanfix

set channeltest "#testhore"

proc chanfix { nick uhost hand chan text } {
global channel2fix

        set scantext [regexp {[\s]} $text match]
        if { $text == "" || $scantext == 1 } {
                return 0
        }
        set channel2fix $text

        channel add $channel2fix
        chanfix2 $channel2fix            
}

proc chanfix2 { channel2fix } {
global chantimer2
        set chanuserlist [chanlist $channel2fix]
        set chanusers [llength $chanuserlist]
        putquick "PRIVMSG #testchan2 :$chanusers counted"
        channelpart $channel2fix            
}

proc channelpart {channel2fix} {
channel remove $channel2fix
}
User avatar
Papillon
Owner
Posts: 724
Joined: Fri Feb 15, 2002 8:00 pm
Location: *.no

Post by Papillon »

if it ignored your timers it is probably the way you set them

Code: Select all

##this will execute at once
timer sometimername 1 [channelpart $channel2fix]
##while this will execute once the timer returns
timer sometimername 1 [list channelpart $channel2fix]
Elen sila lúmenn' omentielvo
n
nso
Voice
Posts: 19
Joined: Fri Apr 25, 2003 4:45 pm

Post by nso »

yeah thanx,
i got the solution from some one at #egghelp :)
Locked