Thanks King, that worked out perfectly. Gives me a better understanding of mirc scripting aswell.

This certainly isn't the PHP programming I'm used to...