   }
 
 exports.finalising = (robot, msg) ->
-  lobby = robot.brain.get 'lobby'
+  lobby = robot.brain.get('lobby')
   server = servers[lobby.server]
 
   if lobby?
-    players = Object.keys lobby.participants
+    players = Object.keys(lobby.participants)
 
     if players.length is 12
 


  if robot.auth.hasRole(msg.envelope.user, 'rcon')

    if server?.rcon and (map in maps or filterMaps(map, maps).length is 1)
      return new Rcon server, (ctx) ->
        ctx.exec "changelevel #{map}", (res) ->
          ctx.close()
          msg.reply "#{msg.random(responses.affirmative)} changing map as we speak..."

    return msg.reply "#{msg.random(responses.mistake)} i don't know that map..."

  return msg.reply "#{msg.random(responses.mistake)} you can't to do that..."

exports.sg = (robot, msg) ->
  user = msg.message.user.id

  if robot.auth.hasRole(msg.envelope.user, 'officer')
    lobby = robot.brain.get('lobby')
    return msg.reply "#{msg.random(responses.mistake)} it seems a pickup is already filling..." if lobby?

    msg.send "#{msg.random(responses.affirmative)} starting a new pickup..."

    validMap = msg.match[2] in maps
    filtered = filterMaps(msg.match[2], maps)

  if robot.auth.hasRole(msg.envelope.user, 'rcon')

    if server?.rcon
      return new Rcon(server, (ctx) ->
        ctx.exec("sm_say #{msg.match[2]}", (res) ->
          ctx.close()
          msg.reply("#{msg.random(responses.affirmative)} your message was delivered...")
        )
      )

    return msg.reply("#{msg.random(responses.mistake)} that's not a valid server...")

  return msg.reply("#{msg.random(responses.mistake)} you can't to do that...")

exports.rconRoster = (robot, msg) ->
  user = msg.message.user.id

  if robot.auth.hasRole(msg.envelope.user, 'rcon')

    previous = robot.brain.get('previous')
    server = servers[previous.server]

    if previous? and server?.rcon
      return new Rcon(server, (ctx) ->
        ctx.exec("sm_say [ #tfbot ] #{Object.keys(previous.participants).join(', ')}", (res) ->
          ctx.close()
          msg.reply("#{msg.random(responses.affirmative)} player roster was delivered...")
        )
      )

    return msg.reply("#{msg.random(responses.mistake)} there's no previous game data. creepy...")

  return msg.reply("#{msg.random(responses.mistake)} you can't to do that...")

exports.rconMap = (robot, msg) ->
  user = msg.message.user.id
