@independentt: Your code will only return one channel. It won't return all the channels where you are. You should correct it and make it as such:
alias chans {
var %xx = 1
while (%xx <= $chan(0)) {
var %yy = %yy $chan(%xx)
inc %xx
}
return %yy
}
@blackvenomm666, the trigger is: //echo -a $chans
You can change
return %yy
to
echo # %yy
so that you can just use /chans to trigger the script and have all your channels echoed to you where you submit the alias.