Skip to content

Commit

Permalink
Allow multiple sockets per user
Browse files Browse the repository at this point in the history
  • Loading branch information
ornicar committed Oct 20, 2012
1 parent 110e2a8 commit 5205651
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions app/round/Hub.scala
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,7 @@ final class Hub(

case IsGone(_, color) sender ! playerIsGone(color)

case Join(uid, user, version, color, ownerWish) {
val owner = ownerWish && !ownerExists(color)
case Join(uid, user, version, color, owner) {
val (enumerator, channel) = Concurrent.broadcast[JsValue]
val member = Member(channel, user, color, owner)
addMember(uid, member)
Expand Down Expand Up @@ -88,8 +87,6 @@ final class Hub(
}
}

def ownerExists(color: Color) = ownerOf(color).isDefined

def crowdEvent = Event.Crowd(
white = ownerOf(White).isDefined,
black = ownerOf(Black).isDefined,
Expand Down

0 comments on commit 5205651

Please sign in to comment.