Correct me if I'm wrong, please.
As I understand it, you want to:
whois someone joining #channel1 and have the results display (echo) in #channel1
and:
whois someone joining #channel2 and have the results display (echo) in #channel2.
If this is the case, Why not just make ALL the results go to an @window (@whois for example)? This (to me) would be a MUCH easier way to keep it out of your active window.
raw 311:*: {
if $window(@Whois) {
goto end
}
window -k(0)zn(0) @Whois
:end
echo @Whois 10Nickname: 12 $+ $2
echo @Whois 10Full address: 12 $+ $2 $+ ! $+ $3 $+ @ $+ $4
echo @Whois 10Real name: 12 $+ $6-
halt
}
raw 319:*: {
echo @Whois 10Channels: 12 $+ $sorttok($3-,32,c)
halt
}
raw 312:*: {
echo @Whois 10Server: 12 $+ $3 ( $+ $4- $+ )
halt
}
raw 307:*: {
echo @Whois 10 $+ $2 $3-
halt
}
raw 301:*: {
if ($2 == $me) return
echo @Whois 10 $2 is away: 12 $+ $3-
halt
}
raw 313:*: {
echo @Whois 10 Status: 12 $+ $5-
halt
}
raw 310:*: {
echo @Whois 10 $2 12 $+ $3-
halt
}
raw 317:*: {
echo @Whois 10Idle time: 12 $+ $duration($3)
if ( $4 isnum ) echo @Whois 10 Signon time: 12 $+ $asctime($4)
halt
}
raw 330:*: {
echo @Whois 10 $2 $+ $4 $5 $6 $7 12 $+ $3
halt
}
raw 318:*: {
echo @Whois 10End of Whois reply
echo @Whois
halt
}
the above works well for me Paste in a new remote file (apologies for the colors)