IRC::Utils take care of many of the tasks you are faced with when working with IRC. Mode lines, ban masks, message encoding and formatting, etc.