gameServer/HandlerUtils.hs
changeset 3543 d84a93b985c1
parent 3542 f216b24aeb7f
child 3568 ae89cf0735dc
equal deleted inserted replaced
3542:f216b24aeb7f 3543:d84a93b985c1
    19 roomOthersChans = do
    19 roomOthersChans = do
    20     (ci, rnc) <- ask
    20     (ci, rnc) <- ask
    21     let ri = clientRoom rnc ci
    21     let ri = clientRoom rnc ci
    22     return $ map (sendChan . client rnc) $ filter (/= ci) (roomClients rnc ri)
    22     return $ map (sendChan . client rnc) $ filter (/= ci) (roomClients rnc ri)
    23 
    23 
       
    24 roomClientsChans :: Reader (ClientIndex, IRnC) [ClientChan]
       
    25 roomClientsChans = do
       
    26     (ci, rnc) <- ask
       
    27     let ri = clientRoom rnc ci
       
    28     return $ map (sendChan . client rnc) (roomClients rnc ri)
       
    29 
    24 thisClientChans :: Reader (ClientIndex, IRnC) [ClientChan]
    30 thisClientChans :: Reader (ClientIndex, IRnC) [ClientChan]
    25 thisClientChans = do
    31 thisClientChans = do
    26     (ci, rnc) <- ask
    32     (ci, rnc) <- ask
    27     return $ [sendChan (rnc `client` ci)]
    33     return $ [sendChan (rnc `client` ci)]
    28 
    34