 		beacon.set 'percentage', newPercentage
 
 
+
+#==================== Functions called by timers ====================
 # Called by the beacon capture timer
-exports.onCapture = (args) !->
+exports.onCapture = (args) ->
 	beacon = Db.shared.ref 'game', 'beacons', args.beacon
 	nextOwner = beacon.peek('nextOwner')
 	log 'Team ', nextOwner, ' has captured beacon ', beacon.key(), ', players: ', args.players

# Get clients ingame user ID
# exports.client_getIngameUserId = (client) ->
# 	client.reply 

exports.onGeoloc = (userId, geoloc) ->
	log 'Geoloc from ' + Plugin.userName(userId) + '('+userId+'): ', JSON.stringify(geoloc)

exports.client_log = (userId, message) ->
	log 'Client:'+Plugin.userName(userId)+":"+userId+": "+message

		}

# Game timer
setTimer = ->
	if Db.shared.peek('game', 'roundTimeUnit') is 'Months'
		seconds = Db.shared.peek('game', 'roundTimeNumber')*2592000
	else if Db.shared.peek('game', 'roundTimeUnit') is 'Days'
