I think $server.prob will be useful if it will return the modes of the connection (if you had tape /server -p in example, then, don't join the auto-join channels)
if it's already in mIRC sorry wink but give me the cmd