This displays to you in your active window. If you want it else where, change the .echo to .msg <channel/nick>
Code:
alias list_all {
  .scon -at1 list_chan
}
alias list_chan {
  .echo -a $network
  var %a = 1, %b = $chan(0)
  while %a <= %b {
    echo -a $chan(%a)
    inc %a
  }
}