See Names: .names $chan
alias nicklist { var %i = 1 while $nick(#,%i) { echo -s * # %i $ifmatch inc %i } end of nicks on # }