'Extracts the user\'s response, and returns a list of parsed lines.
If messageType is defined, only messages of that type will be returned.'

def _response(self, user, messageType=None):

    response = user.transport.value()
    if ((bytes != str) and isinstance(response, bytes)):
        response = response.decode('utf-8')
    response = response.splitlines()
    user.transport.clear()
    result = []
    for message in map(irc.parsemsg, response):
        if ((messageType is None) or (message[1] == messageType)):
            result.append(message)
    return result
