I really have no idea if I approached this the way you meant but try this:
menu channel {
Nicks in $chan
.$submenu($ncks($1))
}
alias ncks {
var %x = $nick($chan,0)
if ($1 == begin) return -
while (%x) {
if ($1 == %x) return $nick($chan,%x) : msg $nick($chan,%x) ...
if ($1 == end) return -
dec %x
}
}
Right click in a channel.
Edit:
Things I saw that could be a problem with your code:
1. set %x=1
Solution: set %x 1 or var %x = 1
2. You're missing a closing brace at the bottom of your code.
Some minor tips:
Codes in Remotes and Aliases are evaluated, so you don't really need the slashes.
When calling the menu from the Status $chan will have no value.
-Andy