def respond(self, message, user=None):
        if user not in names:
            return

        message = message.strip()

        # Update points left
        latest_date = r.get(DATE)
        now = datetime.utcnow().date()

        if not latest_date:
            latest_date = utc_str()
            r.set(DATE, latest_date)
        else:
            delta = now - from_utc_str(latest_date).date()
            if delta.days > 0:
                for person in names:
                    r.hset(person, 'left', DAILY_ALLOWANCE)

                r.set(DATE, utc_str())

        if message.startswith(('leaderboard', 'scoreboard',)):
            values = map(self.get_points, people)
            values = filter(None, values)

            if not values:
                return

            values.sort(key=lambda x: x[1])
            values.reverse()
            self.speak(", ".join(["%s: %s" % v for v in values]))
            return

        if message.startswith('quota'):
            value = r.hget(user, 'left')
            self.speak(user + ': you have %s left' % value)
            return

        res = re.findall(pattern, message)

        if not res:
            return

        u, op, value = res[0]
        value = int(value)

        if user == u:
            self.speak(user + ': lol, did you really just try to give points to yourself?')
            return

        if u not in names:
            return

        source_user_hash = r.hgetall(user)
        dest_user_hash = r.hgetall(u)

        if not source_user_hash:
            source_user_hash = {
                'score': 0,
                'left': DAILY_ALLOWANCE
            }

        if not dest_user_hash:
            dest_user_hash = {
                'score': 0,
                'left': DAILY_ALLOWANCE
            }

        if op == '+':
            if int(source_user_hash.get('left', 0)) < value:
                # Not enough points left for the day
                self.speak(user + ': not enough points left, lol')
                return

        if op == '+':
            r.hincrby(u, 'score', value)
            r.hincrby(user, 'left', value * -1)

        if op == '-':
            if int(source_user_hash.get('score', 0)) < value:
                # Not enough of own points
                self.speak(user + ': not enough score, lol')
            else:
                r.hincrby(u, 'score', value * -1)
                r.hincrby(user, 'score', value * -1)
dataset/ETHPy150Open honza/nigel/matchers/points.py/PointsMatcher.respond/original