Good thinkin' zfr.
You could also use
/who #channel which works in a similar way as /names.
Just a note about those two commands, most servers will set a usermode on you when you connect called +i (invisible). This means that users will not be shown in /names or /who if the user is not inside the channel, so you may not get any results.
Make sure you don't get mixed up with the +i channel mode (invite only) and the +i user mode (invisible), they are two different things
Regards,