gameServer/HandlerUtils.hs
changeset 4975 31da8979e5b1
parent 4932 f11d80bac7ed
child 4986 33fe91b2bcbf
equal deleted inserted replaced
4974:078cd026a7b1 4975:31da8979e5b1
    49 thisClientChans :: Reader (ClientIndex, IRnC) [ClientChan]
    49 thisClientChans :: Reader (ClientIndex, IRnC) [ClientChan]
    50 thisClientChans = do
    50 thisClientChans = do
    51     (ci, rnc) <- ask
    51     (ci, rnc) <- ask
    52     return [sendChan (rnc `client` ci)]
    52     return [sendChan (rnc `client` ci)]
    53 
    53 
    54 answerClient :: [B.ByteString] -> Reader (ClientIndex, IRnC) [Action]
    54 answerClient :: [B.ByteString] -> Reader (ClientIndex, IRnC) [Action c]
    55 answerClient msg = liftM ((: []) . flip AnswerClients msg) thisClientChans
    55 answerClient msg = liftM ((: []) . flip AnswerClients msg) thisClientChans
    56 
    56 
    57 allRoomInfos :: Reader (a, IRnC) [RoomInfo]
    57 allRoomInfos :: Reader (a, IRnC) [RoomInfo]
    58 allRoomInfos = liftM ((\irnc -> map (room irnc) $ allRooms irnc) . snd) ask
    58 allRoomInfos = liftM ((\irnc -> map (room irnc) $ allRooms irnc) . snd) ask
    59 
    59