Adapted from Zimsky's IRCLink