Rate-limits commands.

        | If a nick uses commands with the limit attr set, record the time
        | at which they were used.
        | If the command is used more than `limit` times in a
        | minute, ignore the nick.

def abusecheck(self, send, nick, target, limit, cmd):
        """ Rate-limits commands.

        | If a nick uses commands with the limit attr set, record the time
        | at which they were used.
        | If the command is used more than `limit` times in a
        | minute, ignore the nick.
        """
        if nick not in self.abuselist:
            self.abuselist[nick] = {}
        if cmd not in self.abuselist[nick]:
            self.abuselist[nick][cmd] = [datetime.now()]
        else:
            self.abuselist[nick][cmd].append(datetime.now())
        count = 0
        for x in self.abuselist[nick][cmd]:
            # 60 seconds - arbitrary cuttoff
            if datetime.now() - x < timedelta(seconds=60):
                count = count + 1
        if count > limit:
            msg = "%s: don't abuse scores!" if cmd == 'scores' else "%s: stop abusing the bot!"
            send(msg % nick, target=target)
            with self.db.session_scope() as session:
                send(misc.ignore(session, nick))
            return True