Skip to content

Commit

Permalink
prevent multi-accounting
Browse files Browse the repository at this point in the history
  • Loading branch information
TechStudent10 committed Dec 11, 2024
1 parent b29f16f commit cd6332a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions server/src/handlers/lobby.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,10 @@ const lobbyHandlers: Handlers = {
sendError(socket, `lobby with code '${code}' does not exist` )
return
}
if (state.lobbies[code].accounts.filter(acc => acc.accountID == account.accountID).length >= 1) {
sendError(socket, "you are already in this lobby")
return
}
if (Object.keys(state.swaps).includes(code)) {
sendError(socket, `creation rotation with code '${code}' is already in session` )
return
Expand Down

0 comments on commit cd6332a

Please sign in to comment.