change irc handle and client socket to external linkage