To join certain channels on a server I belong to you must message Drone with your username and key. Drone will then force you to join the channel.

I would like to /join channels as normal and have the script take care of everything else. Now I can check with /names and use raw to see if Drone is in the channel but I'm not sure if this is the best way to go as raw 473 is used when joining any channel and I'm not sure how to go about differentiating between joining the channel and using the /names command with my script.

How best could I go about checking to see if Drone is on the channel I want to /join and then msging Drone?