gameServer/HWProtoLobbyState.hs
changeset 3566 772a46ef8288
parent 3555 4c5ca656d1bb
child 3645 c0b3f1bb9316
equal deleted inserted replaced
3565:bc3410104894 3566:772a46ef8288
    31     let cl = irnc `client` ci
    31     let cl = irnc `client` ci
    32     rooms <- allRoomInfos
    32     rooms <- allRoomInfos
    33     let roomsInfoList = concatMap (roomInfo irnc) . filter (\r -> (roomProto r == clientProto cl) && not (isRestrictedJoins r))
    33     let roomsInfoList = concatMap (roomInfo irnc) . filter (\r -> (roomProto r == clientProto cl) && not (isRestrictedJoins r))
    34     return [AnswerClients [sendChan cl] ("ROOMS" : roomsInfoList rooms)]
    34     return [AnswerClients [sendChan cl] ("ROOMS" : roomsInfoList rooms)]
    35     where
    35     where
    36         roomInfo irnc room
    36         roomInfo irnc room = [
    37             | roomProto room < 28 = [
       
    38                 name room,
       
    39                 B.pack $ show (playersIn room) ++ "(" ++ show (length $ teams room) ++ ")",
       
    40                 B.pack $ show $ gameinprogress room
       
    41                 ]
       
    42             | otherwise = [
       
    43                 showB $ gameinprogress room,
    37                 showB $ gameinprogress room,
    44                 name room,
    38                 name room,
    45                 showB $ playersIn room,
    39                 showB $ playersIn room,
    46                 showB $ length $ teams room,
    40                 showB $ length $ teams room,
    47                 nick $ irnc `client` masterID room,
    41                 nick $ irnc `client` masterID room,