rework connect_to_irc function - error return value