 
 config = require './config.js'
 anyDB = require 'any-db'
-mysqlConnection = anyDB.createPool config.DATABASE_URL, min: 2, max: 20
+dbConnection = anyDB.createPool config.DATABASE_URL, min: 2, max: 20
 lib = require './lib.js'
 async = require 'async'
 express = require 'express'

	unless request.uonline.basicOpts.loggedIn
		response.redirect '/login/'
	else
		lib.game.goAttack.sync null, mysqlConnection, request.uonline.basicOpts.userid
		response.redirect '/game/'




app.get '/profile/user/:nickname/', (request, response) ->
	nickname = request.param('nickname')
	chars = lib.game.getUserCharacters.sync null, dbConnection, nickname
	if chars is null
		throw new Error '404'
	options = request.uonline.basicOpts
