'This hack is to support mIRC, which sends LF only, even though the RFC
says CRLF.  (Also, the flexibility of LineReceiver to turn "line mode"
on and off was not required.)'

def dataReceived(self, data):

    if isinstance(data, bytes):
        data = data.decode('utf-8')
    lines = (self.buffer + data).split(LF)
    self.buffer = lines.pop()
    for line in lines:
        if (len(line) <= 2):
            continue
        if (line[(-1)] == CR):
            line = line[:(-1)]
        (prefix, command, params) = parsemsg(line)
        command = command.upper()
        self.handleCommand(command, prefix, params)
