gameServer/HWProtoLobbyState.hs
changeset 8519 98e2dbdda8c0
parent 8486 9a65baafd7d7
child 8897 d6c310c65c91
equal deleted inserted replaced
8517:648bb1cb7ebc 8519:98e2dbdda8c0
    90                 , AnswerClients [sendChan cl] $ "JOINED" : nicks
    90                 , AnswerClients [sendChan cl] $ "JOINED" : nicks
    91                 , AnswerClients chans ["CLIENT_FLAGS", "-r", nick cl]
    91                 , AnswerClients chans ["CLIENT_FLAGS", "-r", nick cl]
    92                 , AnswerClients [sendChan cl] $ ["CLIENT_FLAGS", "+h", ownerNick]
    92                 , AnswerClients [sendChan cl] $ ["CLIENT_FLAGS", "+h", ownerNick]
    93             ]
    93             ]
    94             ++ (if clientProto cl < 38 then map (readynessMessage cl) jRoomClients else [sendStateFlags cl jRoomClients])
    94             ++ (if clientProto cl < 38 then map (readynessMessage cl) jRoomClients else [sendStateFlags cl jRoomClients])
    95             ++ answerFullConfig cl (mapParams jRoom) (params jRoom)
    95             ++ [AnswerClients [sendChan cl] ["PING"]
    96             ++ answerTeams cl jRoom
    96                 , ModifyClient $ \c -> c{actionsPending = actionsPending cl
    97             ++ watchRound cl jRoom chans
    97                     ++ answerFullConfig cl (mapParams jRoom) (params jRoom)
       
    98                     ++ answerTeams cl jRoom
       
    99                     ++ watchRound cl jRoom chans}
       
   100                 ]
    98 
   101 
    99         where
   102         where
   100         readynessMessage cl c = AnswerClients [sendChan cl] [if isReady c then "READY" else "NOT_READY", nick c]
   103         readynessMessage cl c = AnswerClients [sendChan cl] [if isReady c then "READY" else "NOT_READY", nick c]
   101         sendStateFlags cl clients = AnswerClients [sendChan cl] . concat . intersperse [""] . filter (not . null) . concat $
   104         sendStateFlags cl clients = AnswerClients [sendChan cl] . concat . intersperse [""] . filter (not . null) . concat $
   102                 [f "+r" ready, f "-r" unready, f "+g" ingame, f "-g" inroomlobby]
   105                 [f "+r" ready, f "-r" unready, f "+g" ingame, f "-g" inroomlobby]