That's what KingTomato's code does.
The line
Code:
 menu channel { 
is what puts the commands into the channel menu, which you access by right clicking in the channel.