The submenu return is always evaluated, thus you're prompted for input the very moment you do the right-click.
You may prevent this pre-evaluation in the submenu definition like:
menu channel {
TEST
.$submenu($testsub($1))
}
alias -l testsub {
if ($1 isnum 1-3) { return <your hget for menuitem> : .msg chanserv levels $!chan set <your hget for command> $$!?"Enter new level:" }
}
Note the exclamation mark in the $$
!?"<prompt>" and in $
!chan.
If you prefer the alias-method DJ_Sol suggested I *highly recommend* to add the exclamation mark to the $chan identifier (command part) there, or you'll end up evaluating possible channel names like "#$me" - and this is annoying at best, dangerous at worst.