       requester.send(JSON.stringify({action: "remove", gameid: socket.gameid}))
     socket.leave(socket.gameid)
     socket.gameid = false
-    lobby.emit('netrunner', {type: "games", games: games})
+    refreshLobby()
   for k, v of games
     delete games[k] if v.players.length < 2 and (new Date() - v.date) > 3600000
 

# Game lobby
gameid = 0
games = {}

swapSide = (side) ->
  if side is "Corp" then "Runner" else "Corp"

removePlayer = (socket) ->
  game = games[socket.gameid]

          socket.join(msg.gameid)
          socket.gameid = msg.gameid
          socket.emit("netrunner", {type: "game", gameid: msg.gameid, started: game.started})
          refreshLobby()
          if game.started
            requester.send(JSON.stringify({action: "notification", gameid: msg.gameid, text: "#{getUsername(socket)} joined the game as a spectator."}))
          else
