'Ticket constructor
@param ip the IP address
@param time the ban time
@param matches (log) lines caused the ticket'

def __init__(self, ip=None, time=None, matches=None, data={}, ticket=None):

    self.setIP(ip)
    self._flags = 0
    self._banCount = 0
    self._banTime = None
    self._time = (time if (time is not None) else MyTime.time())
    self._data = {'matches': (matches or []), 'failures': 0}
    if (data is not None):
        for (k, v) in data.iteritems():
            if (v is not None):
                self._data[k] = v
    if ticket:
        self.update(ticket)
