Hi can anyone show me a way to whois the whole channel when I join it? In other words, I would like to be able to whois people upon my arrival to a room. I have tried the code below but nothing happened:

Code:
on *:JOIN:#: {
if ($nick == $me) { 
 whois $nick 
 }
}


I'm not sure if there's an effective way of doing this to trigger the whois successfully.