I want to make a command to execute it in the status window. Let's say I want to print the first N lines of the names output of the M input arguments of the command:

/mycommand #chan1 #chan2 ... #chanM 4

The output should be the first 4 lines of the /names output of the M channels.

Another option could be to print the last M users connected to each channel.