':param lines: list of lines
:return list: list of entries generated from lines'

def entries_from_multilinepatterns(self, lines):

    entries = []
    rest = []
    while (len(lines) > 0):
        entry = Entry()
        raw_message = u''
        matched_lines = []
        for (idx, (rx, vals, optional)) in enumerate(self.multilinepatterns):
            log.debug(u'Using    pattern    %s    to    parse    message    vars', rx.pattern)
            line = u''
            for l in list(lines):
                for (ignore_rx, expected) in self.ignore_lines:
                    if (ignore_rx.match(l) and expected):
                        log.debug(u'Ignoring    message:    matched    ignore    line')
                        lines.remove(l)
                        break
                else:
                    line = l
                    break
            raw_message += (u'\n' + line)
            match = self.match_message_patterns([(rx, vals, optional)], line)
            if match:
                entry.update(match)
                matched_lines.append(line)
                lines.remove(line)
            elif optional:
                log.debug(u'No    match    for    optional    extract    pattern    found.')
            elif (not line):
                rest = (matched_lines + lines)
                break
            elif (idx == 0):
                log.error(u'No    matches    found    for    pattern    %s', rx.pattern)
                lines.remove(line)
                rest = lines
                break
            else:
                log.error(u'No    matches    found    for    pattern    %s', rx.pattern)
                rest = lines
                break
        else:
            entry[u'irc_raw_message'] = raw_message
            entries.append(entry)
            continue
    return (entries, rest)
