 
 
 fetchStatsFromURL = ((request, response) ->
-	chars = lib.game.getUserCharacters.sync null, dbConnection, request.param 'username'
+	chars = lib.game.getUserCharacters.sync null, dbConnection, request.params.username
 	if not chars?
 		throw new Error '404'
 	for i of chars

		lib.game.hitOpponent.sync(
			null, dbConnection,
			request.uonline.user.character_id,
			request.param('id')
		)
		response.redirect '/game/'


			'UPDATE armor '+
				'SET equipped = true '+
				'WHERE id = $1 AND owner = $2',
			[request.params.id, request.uonline.user.character_id]
		response.redirect '/inventory/'


app.get '/action/switch_character/:id',
	mustBeAuthed,
	(request, response) ->
		lib.game.switchCharacter dbConnection, request.uonline.user.id, request.params.id
		response.redirect 'back'


