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
}