In this particular script, I wouldn't use $chan or /say as that would change the channel the number appears on if you change channels, or move to a /query window. I'd probably set some variable to $active, and have it /msg %variable. But with most aliases /say works very well, as long as it immediately does what it's supposed to do instead of having a delay (as a timer will create). I have a few aliases that use /say instead of trying to determine if the active window is a channel or nick, then sending a message to that window. /say is just much neater and easier in such situations.