First of all, in mIRC's firewall options, set that to NONE (if you dont see the word NONE, leave your cursor on the lil arrow for the drop down and use the up/down arrows on your keyboard)
I dont know what error you are seeing when you try to connect to an IRC networks server, but are you sure the one you are trying is a valid linked server?
try typing in your status window one of these at a time:
/server b0rk.uk.quakenet.org
/server 213.221.165.248
the common server ports used to connect to an IRC network:
6660-6669,7000-7001 and port 113 for identd. the ports you see listed in mIRC's dcc options (1024-5000) are those used to dcc.