Use a struct for IRC lines, clean up code a bit