Code:
alias inisec {
  if !$isfile($$1-) .echo -a File doesn't exist. $+($chr(40),$1-,$chr(41))
  var %i = 1
  while %i <= $ini($1-,0) {
    set %ini_sec $addtok(%ini_sec,$ini($1-,%i),44)
    inc %i
  }
  echo -a %ini_sec
]

NOTE: If you have an INI file with lots of sections, and/or sections with very long names, then this code might return a Variable Too Long error.