Thanks guys, this cleared some stuff up for me.
Someone on irc told me that by the time the timer fired the command, the scope for $chan was lost. This makes absolute sense to me, but I'm just curious if there is a way to refocus $chan to be the one used when _start was called... I was reading the help files and I saw stuff about $cid and /scid to force a command to work on a specific channel id. Would it be possible to reinitialize $chan using a $cid? That way, I could just do something like this:
on *:TEXT:!start:#test: _start
on *:INPUT:#test: if ($1 == !start) _start
alias _start {
echo -a cid is: $cid & chan is: $chan
.timer 1 5 _test $cid
}
alias _test {
/scid $1
..fix $chan..
echo -a cid is: $cid & chan is: $chan
}
The structure of my code actually goes from _start to _test1 to _test2 and possibly _test3, all requiring access to $chan. I'd hate to have to add parameters to pass $network and $chan to each of these, down the line..