Fix incorrect handling of Direct Connect.

The game doesn't require a port, so we shouldn't either, if there isn't one add ":5121".
Resolve hostnames ourselves, so that non-ip-address get properly handled.