Skip to content

Commit

Permalink
fix(lobby): prevent re-prompting game client auth
Browse files Browse the repository at this point in the history
  • Loading branch information
p2r3 committed Sep 26, 2024
1 parent ddb5a16 commit 1d5d6cb
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions pages/live/lobby.js
Original file line number Diff line number Diff line change
Expand Up @@ -321,10 +321,13 @@ async function lobbyInit () {
lobbySocket.addEventListener("message", lobbyEventHandler);

// Prompt game client authentication
showPopup(
"Connect with Portal 2",
`To connect your game client, start the Spplice package, <a href="javascript:copyEventToken()">click here</a> to copy your lobby token, then paste that into your console.`
);
if (!("promptedGameAuth") in window) {
showPopup(
"Connect with Portal 2",
`To connect your game client, start the Spplice package, <a href="javascript:copyEventToken()">click here</a> to copy your lobby token, then paste that into your console.`
);
window.promptedGameAuth = true;
}

// Handle the lobby rename button
window.changeLobbyName = function () {
Expand Down

0 comments on commit 1d5d6cb

Please sign in to comment.