 				result: 'fail'
 				reason: "character ##{character_id} is in battle ##{res.rows[0].battle}"
 			}
-	
+
 	game.goEscape.sync(null, tx, character_id)
 
 	# if the character we delete is active, unselect it


sync = require 'sync'
transaction = require 'any-db-transaction'
game = require './lib/game'


# Check if a character with the given name exists.

			result: 'fail'
			reason: "character ##{character_id} of user ##{user_id} not found"
		}

	unless force
		res = tx.query.sync(tx,
			"SELECT battle FROM battle_participants WHERE character_id = $1",
