'Get bans from the database.
Parameters
jail : Jail
Jail that the ban belongs to. Default `None`; all jails.
bantime : int
Ban time in seconds, such that bans returned would still be
valid now.  Negative values are equivalent to `None`.
Default `None`; no limit.
ip : str
IP Address to filter bans by. Default `None`; all IPs.
Returns
list
List of `Ticket`s for bans stored in database.'

def getBans(self, **kwargs):

    tickets = []
    for (ip, timeofban, data) in self._getBans(**kwargs):
        tickets.append(FailTicket(ip, timeofban))
        tickets[(-1)].setData(data)
    return tickets
