gameServer/HWProtoCore.hs
changeset 7766 98edc0724a28
parent 5996 2c72fe81dd37
child 8396 5123eac2f9d6
equal deleted inserted replaced
7765:1e162c1d6dc7 7766:98edc0724a28
    49     let cl = rnc `client` fromJust maybeClientId
    49     let cl = rnc `client` fromJust maybeClientId
    50     let roomId = clientRoom rnc clientId
    50     let roomId = clientRoom rnc clientId
    51     let clRoom = room rnc roomId
    51     let clRoom = room rnc roomId
    52     let roomMasterSign = if isMaster cl then "@" else ""
    52     let roomMasterSign = if isMaster cl then "@" else ""
    53     let adminSign = if isAdministrator cl then "@" else ""
    53     let adminSign = if isAdministrator cl then "@" else ""
    54     let roomInfo = if roomId /= lobbyId then B.concat [roomMasterSign, "room ", name clRoom] else adminSign `B.append` "lobby"
    54     let rInfo = if roomId /= lobbyId then B.concat [roomMasterSign, "room ", name clRoom] else adminSign `B.append` "lobby"
    55     let roomStatus = if isJust $ gameInfo clRoom then
    55     let roomStatus = if isJust $ gameInfo clRoom then
    56             if teamsInGame cl > 0 then "(playing)" else "(spectating)"
    56             if teamsInGame cl > 0 then "(playing)" else "(spectating)"
    57             else
    57             else
    58             ""
    58             ""
    59     let hostStr = if isAdminAsking then host cl else cutHost $ host cl
    59     let hostStr = if isAdminAsking then host cl else cutHost $ host cl
    63         answerClient [
    63         answerClient [
    64             "INFO",
    64             "INFO",
    65             nick cl,
    65             nick cl,
    66             B.concat ["[", hostStr, "]"],
    66             B.concat ["[", hostStr, "]"],
    67             protoNumber2ver $ clientProto cl,
    67             protoNumber2ver $ clientProto cl,
    68             B.concat ["[", roomInfo, "]", roomStatus]
    68             B.concat ["[", rInfo, "]", roomStatus]
    69             ]
    69             ]
    70 
    70 
    71 
    71 
    72 handleCmd_loggedin cmd = do
    72 handleCmd_loggedin cmd = do
    73     (ci, rnc) <- ask
    73     (ci, rnc) <- ask