irc.c fixed memory leak, shortened code