 			i.name = i.text
 			i.to = i.id
 		tmpUsers = lib.game.getNearbyUsers.sync null,
-			mysqlConnection, userid, location.id
+			dbConnection, userid, location.id
 		tmpUsers.forEach (i) -> # Facepalm. Refs #273 too.
 			i.name = i.user
 		options.players_list = tmpUsers
-		tmpMonsters = lib.game.getNearbyMonsters.sync null, mysqlConnection, location.id
+		tmpMonsters = lib.game.getNearbyMonsters.sync null, dbConnection, location.id
 		options.monsters_list = tmpMonsters
-		options.fight_mode = lib.game.isInFight.sync null, mysqlConnection, userid
-		options.autoinvolved_fm = lib.game.isAutoinvolved.sync null, mysqlConnection, userid
+		options.fight_mode = lib.game.isInFight.sync null, dbConnection, userid
+		options.autoinvolved_fm = lib.game.isAutoinvolved.sync null, dbConnection, userid
 		response.render 'game', options
 	else
 		response.redirect '/login/'
 
 
 app.get '/action/go/:to', (request, response) ->
-	lib.game.changeLocation.sync null, mysqlConnection, request.uonline.basicOpts.userid, request.param('to')
+	lib.game.changeLocation.sync null, dbConnection, request.uonline.basicOpts.userid, request.param('to')
 	response.redirect '/game/'
 
 


app.get '/action/logout', (request, response) ->
	# TODO: move sessid to uonline{}
	lib.user.closeSession mysqlConnection, request.cookies.sessid, (error, result) ->
		if error?
			response.send 500
		else

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


