 
 log = -> console.log arguments...
 
-{argv} = require 'optimist'
+{ argv } = require 'optimist'
 
-{exec} = require 'child_process'
-{extend} = require 'underscore'
+{ exec }           = require 'child_process'
+{ extend }         = require 'underscore'
 { join: joinPath } = require 'path'
 
 usertracker = require('../../../usertracker')
 
-process.on 'uncaughtException', (err)->
+process.on 'uncaughtException', (err) ->
   exec './beep'
   console.log err, err?.stack
   process.exit 1

        { clientIP } = session
        callback {
          sessionToken, context, clientIP,
          connection:delegate:account
        }

      else
        console.error "this is not a proper account", {sessionToken}
        console.error "constructor is JAccount", JAccount is account.constructor
}

koding.on 'authenticateUser', (client, callback)->
  {delegate} = client.connection
  callback delegate

koding.on "errFirstDetected", (err)-> console.error err

koding.connect ->
  (require './init').init koding


broker = new Broker mqOptions

mqConfig = { host: mq.host, port: mq.port, login: mq.login, password: mq.password, vhost: mq.vhost }

# TODO exchange version must be injected here, when we have that support
mqConfig.exchangeName = "#{socialapi.eventExchangeName}:0"
