diff -r 0f5961910e27 -r f0a8ac191839 gameServer/Actions.hs --- a/gameServer/Actions.hs Tue Aug 27 17:22:07 2013 +0400 +++ b/gameServer/Actions.hs Wed Aug 28 23:11:05 2013 +0400 @@ -651,9 +651,17 @@ ri <- clientRoomA rnc <- gets roomsClients - io $ do + allci <- io $ do r <- room'sM rnc id ri saveReplay r + allClientsM rnc + + readyCheckersIds <- liftM (filter (client'sM isReadyChecker rnc)) allClientsS + when (not $ null readyCheckersIds) $ do + modify (\s -> s{clientIndex = Just $ head readyCheckersIds}) + processAction CheckRecord + where + isReadyChecker cl = isChecker cl && isReady cl processAction CheckRecord = do @@ -666,10 +674,12 @@ , ModifyClient $ \c -> c{checkInfo = cinfo} ] + processAction (CheckFailed msg) = do Just (CheckInfo fileName _) <- client's checkInfo io $ moveFailedRecord fileName + processAction (CheckSuccess info) = do Just (CheckInfo fileName teams) <- client's checkInfo si <- gets serverInfo