'Notify observer a ban occured for ip
Observer will check ip was known (bad) and possibly increase/prolong a ban time
Secondary we will actualize the bans and bips (bad ip) in database'

def banFound(self, ticket, jail, btime):

    if ticket.restored:
        return
    try:
        oldbtime = btime
        ip = ticket.getIP()
        logSys.debug('[%s]    Observer:    ban    found    %s,    %s', jail.name, ip, btime)
        if ((btime != (-1)) and (ticket.getBanTime() is None)):
            btime = self.incrBanTime(jail, btime, ticket)
            if ((btime == (-1)) or (btime > oldbtime)):
                ticket.setBanTime(btime)
        if (btime != (-1)):
            bendtime = (ticket.getTime() + btime)
            logtime = (datetime.timedelta(seconds=int(btime)), datetime.datetime.fromtimestamp(bendtime).strftime('%Y-%m-%d    %H:%M:%S'))
            if (bendtime < MyTime.time()):
                logSys.debug('Ignore    old    bantime    %s', logtime[1])
                return False
        else:
            logtime = ('permanent', 'infinite')
        if (btime != oldbtime):
            logSys.notice('[%s]    Increase    Ban    %s    (%d    #    %s    ->    %s)', jail.name, ip, ticket.getBanCount(), *logtime)
            logSys.log(5, '[%s]    Observer:    prolong    %s    in    %s', jail.name, ip, (btime, oldbtime))
            self.add_timer(min(10, max(0, ((btime - oldbtime) - 5))), self.prolongBan, ticket, jail)
        if ((jail.database is not None) and (not ticket.restored)):
            jail.database.addBan(jail, ticket)
    except Exception as e:
        logSys.error('%s', e, exc_info=(logSys.getEffectiveLevel() <= logging.DEBUG))
