gameServer/HandlerUtils.hs
changeset 4989 4771fed9272e
parent 4986 33fe91b2bcbf
child 6541 08ed346ed341
equal deleted inserted replaced
4988:bd540ba66599 4989:4771fed9272e
    46 thisClientChans :: Reader (ClientIndex, IRnC) [ClientChan]
    46 thisClientChans :: Reader (ClientIndex, IRnC) [ClientChan]
    47 thisClientChans = do
    47 thisClientChans = do
    48     (ci, rnc) <- ask
    48     (ci, rnc) <- ask
    49     return [sendChan (rnc `client` ci)]
    49     return [sendChan (rnc `client` ci)]
    50 
    50 
    51 answerClient :: [B.ByteString] -> Reader (ClientIndex, IRnC) [Action c]
    51 answerClient :: [B.ByteString] -> Reader (ClientIndex, IRnC) [Action]
    52 answerClient msg = liftM ((: []) . flip AnswerClients msg) thisClientChans
    52 answerClient msg = liftM ((: []) . flip AnswerClients msg) thisClientChans
    53 
    53 
    54 allRoomInfos :: Reader (a, IRnC) [RoomInfo]
    54 allRoomInfos :: Reader (a, IRnC) [RoomInfo]
    55 allRoomInfos = liftM ((\irnc -> map (room irnc) $ allRooms irnc) . snd) ask
    55 allRoomInfos = liftM ((\irnc -> map (room irnc) $ allRooms irnc) . snd) ask
    56 
    56