def handle(self, data):
    if (data == 'quit'):
        player.player_database.save()
        self.protocol.remove_handler()
        return
    if (data in ['1', '2', '3']):
        if (self.player.stat_points > 0):
            self.player.stat_points -= 1
            if (data == '1'):
                self.player.attributes.BASE_STRENGTH += 1
            elif (data == '2'):
                self.player.attributes.BASE_HEALTH += 1
            else:
                self.player.attributes.BASE_AGILITY += 1
        self.print_stats(True)
    else:
        logger.warn('unknown command: %s', data)
        self.send(("<reset><clearscreen><red>Unknown Command '%s'<newline>" % data))
        self.print_stats(False)
def handle(self, data):
    if (data == 'quit'):
        player.player_database.save()
        self.protocol.remove_handler()
        return
    if (data in ['1', '2', '3']):
        if (self.player.stat_points > 0):
            self.player.stat_points -= 1
            if (data == '1'):
                self.player.attributes.BASE_STRENGTH += 1
            elif (data == '2'):
                self.player.attributes.BASE_HEALTH += 1
            else:
                self.player.attributes.BASE_AGILITY += 1
        self.print_stats(True)
    else:
        logger.warn('unknown command: %s', data)
        self.send(("<reset><clearscreen><red>Unknown Command '%s'<newline>" % data))
        self.print_stats(False)