Try to update your mIRC version to the latest (7.36) from
www.mirc.com/get.htmlalso if you are using any remote,dll,alias,coms use /remote off and try again to use /join #channel or /server irc.server
NOTE: 6.21 created on 2006 there are too many changes made on 7.36 that will probably fix you problem.