netserver/Miscutils.hs
changeset 1461 87e5a6c3882c
parent 1411 df78c9571bc7
child 1466 c68b0a0969d3
equal deleted inserted replaced
1460:54e4b03e6ba6 1461:87e5a6c3882c
    88 othersInRoom client clients rooms = map handle $ filter (client /=) $ filter (\ci -> room ci == room client) clients
    88 othersInRoom client clients rooms = map handle $ filter (client /=) $ filter (\ci -> room ci == room client) clients
    89 
    89 
    90 fromRoom :: String -> HandlesSelector
    90 fromRoom :: String -> HandlesSelector
    91 fromRoom roomName _ clients _ = map handle $ filter (\ci -> room ci == roomName) clients
    91 fromRoom roomName _ clients _ = map handle $ filter (\ci -> room ci == roomName) clients
    92 
    92 
       
    93 allClients :: HandlesSelector
       
    94 allClients _ clients _ = map handle $ clients
       
    95 
    93 clientOnly :: HandlesSelector
    96 clientOnly :: HandlesSelector
    94 clientOnly client _ _ = [handle client]
    97 clientOnly client _ _ = [handle client]
    95 
    98 
    96 noChangeClients :: ClientsTransform
    99 noChangeClients :: ClientsTransform
    97 noChangeClients a = a
   100 noChangeClients a = a