Skip to content

Commit

Permalink
simplify SocketMember trait
Browse files Browse the repository at this point in the history
  • Loading branch information
ornicar committed Dec 4, 2016
1 parent eaa494a commit 47b1b7d
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions modules/socket/src/main/SocketMember.scala
Expand Up @@ -2,23 +2,17 @@ package lila.socket

import play.api.libs.json.JsValue

trait SocketMember extends Ordered[SocketMember] {
trait SocketMember {

protected val channel: JsChannel
val userId: Option[String]
val troll: Boolean

def isAuth = userId.isDefined

def compare(other: SocketMember) = ~userId compare ~other.userId
def push(msg: JsValue) = channel push msg

def push(msg: JsValue) {
channel push msg
}

def end {
channel.end
}
def end = channel.end
}

object SocketMember {
Expand Down

0 comments on commit 47b1b7d

Please sign in to comment.