irc: catch exception in gethostbyname