begin ircbot code cleanup and rewrite