netserver/Miscutils.hs
changeset 1618 2b9cadc232ab
parent 1617 30170c63a9dd
child 1646 19b3784ac9d2
equal deleted inserted replaced
1617:30170c63a9dd 1618:2b9cadc232ab
   128 sameRoom client clients rooms = filter (\ci -> room ci == room client) clients
   128 sameRoom client clients rooms = filter (\ci -> room ci == room client) clients
   129 
   129 
   130 sameProtoLobbyClients :: HandlesSelector
   130 sameProtoLobbyClients :: HandlesSelector
   131 sameProtoLobbyClients client clients rooms = filter (\ci -> room ci == [] && protocol ci == protocol client) clients
   131 sameProtoLobbyClients client clients rooms = filter (\ci -> room ci == [] && protocol ci == protocol client) clients
   132 
   132 
       
   133 otherLobbyClients :: HandlesSelector
       
   134 otherLobbyClients client clients rooms = filter (\ci -> room ci == []) clients
       
   135 
   133 noRoomSameProto :: HandlesSelector
   136 noRoomSameProto :: HandlesSelector
   134 noRoomSameProto client clients _ = filter (null . room) $ filter (\ci -> protocol client == protocol ci) clients
   137 noRoomSameProto client clients _ = filter (null . room) $ filter (\ci -> protocol client == protocol ci) clients
   135 
   138 
   136 othersInRoom :: HandlesSelector
   139 othersInRoom :: HandlesSelector
   137 othersInRoom client clients rooms = filter (client /=) $ filter (\ci -> room ci == room client) clients
   140 othersInRoom client clients rooms = filter (client /=) $ filter (\ci -> room ci == room client) clients