when i joina chan

how can i loop and echo all the nicks in the channel