When somebody says "hi", I want to /whois everybody in the channel who is voiced.

I know how to respond to text with ON:TEXT:#channel:{action

...but that's it.