gameServer/HandlerUtils.hs
changeset 3542 f216b24aeb7f
parent 3501 a3159a410e5c
child 3543 d84a93b985c1
equal deleted inserted replaced
3540:b602a57ba0fb 3542:f216b24aeb7f
    17 
    17 
    18 roomOthersChans :: Reader (ClientIndex, IRnC) [ClientChan]
    18 roomOthersChans :: Reader (ClientIndex, IRnC) [ClientChan]
    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) (roomClients rnc ri)
    22     return $ map (sendChan . client rnc) $ filter (/= ci) (roomClients rnc ri)
    23 
    23 
    24 thisClientChans :: Reader (ClientIndex, IRnC) [ClientChan]
    24 thisClientChans :: Reader (ClientIndex, IRnC) [ClientChan]
    25 thisClientChans = do
    25 thisClientChans = do
    26     (ci, rnc) <- ask
    26     (ci, rnc) <- ask
    27     return $ [sendChan (rnc `client` ci)]
    27     return $ [sendChan (rnc `client` ci)]