 launchServer = (serv, lobby)->
   id = idCounter
   idCounter+=1
-  port = Math.floor(Math.random()*1000)+30000
+  port = Math.floor(Math.random()*(serv.portRangeEnd-serv.portRangeStart))+serv.portRangeStart
   if process.env.FORCE_PORT?
     port = process.env.FORCE_PORT
     console.log "port forced to "+port+" by env variable"

Rcon = Meteor.require('rcon')
ws = Meteor.require('ws').Server
serverPassword = "kwxmMKDcuVjQNutZOwZy"
serverVersion = "1.0.5"

idCounter=100


    activeLobbies: []
    ip: ""
    enabled: true
    portRangeStart: 3000
    portRangeStop: 3100
  ourID = null
  console.log "new server connected"
  ws.on 'close', ->
