gameServer/Actions.hs
changeset 2948 3f21a9dc93d0
parent 2867 9be6693c78cb
child 3283 18ee933a5864
equal deleted inserted replaced
2947:803b277e4894 2948:3f21a9dc93d0
   310         roomPlayers = Prelude.map (nick . (clients !)) roomPlayersIDs
   310         roomPlayers = Prelude.map (nick . (clients !)) roomPlayersIDs
   311         roomPlayersIDs = IntSet.elems $ playersIDs room
   311         roomPlayersIDs = IntSet.elems $ playersIDs room
   312 
   312 
   313 
   313 
   314 processAction (clID, serverInfo, clients, rooms) (RemoveTeam teamName) = do
   314 processAction (clID, serverInfo, clients, rooms) (RemoveTeam teamName) = do
   315     newRooms <-	if not $ gameinprogress room then
   315     newRooms <- if not $ gameinprogress room then
   316             do
   316             do
   317             processAction (clID, serverInfo, clients, rooms) $ AnswerOthersInRoom ["REMOVE_TEAM", teamName]
   317             processAction (clID, serverInfo, clients, rooms) $ AnswerOthersInRoom ["REMOVE_TEAM", teamName]
   318             return $
   318             return $
   319                 adjust (\r -> r{teams = Prelude.filter (\t -> teamName /= teamname t) $ teams r}) rID rooms
   319                 adjust (\r -> r{teams = Prelude.filter (\t -> teamName /= teamname t) $ teams r}) rID rooms
   320         else
   320         else