Most scripts are not channel specific, and even if the script is channel specific, the returns from a /whois are network specific, not channel.
Can you show us the other script, or, if you don't have one yet, tell us what it is you want the other script to do with the information that is returned by the /whois command?