 	teamMax = getFirstTeam()
 	newLead = false;
 	newLead = teamMax isnt Db.shared.peek('game', 'firstTeam')
-	
+
 	log "[checkNewLead()] newLead: " + newLead + " "
 
 	# create score event

	beacon.set 'owner', nextOwner
	beacon.set 'actionStarted', new Date()/1000
	beacon.set 'action', 'none'
	
	# Set a timer to gain teamscore overtime
	log '[onCapture()] pointsTime: '+global.pointsTime						
	Timer.set global.pointsTime, 'overtimeScore', {beacon: beacon.key()}

	# The game will end in 1 hour if all the beacons are captured by one team


# Get clients ingame user ID
# exports.client_getIngameUserId = (client) ->
# 	client.reply
exports.client_getNewDeviceId = (client, result) ->
	newId = (Db.shared.peek('maxDeviceId'))+1
	log '[getDeviceId()] newId ' + newId + ' send to ' + Plugin.userName(client) + " (" + client + ")"
