--- a/gameServer/Actions.hs Tue Sep 08 19:20:58 2015 +0300
+++ b/gameServer/Actions.hs Mon Nov 16 22:57:24 2015 +0300
@@ -744,10 +744,6 @@
blackList <- liftM (map (recordFileName . fromJust . checkInfo) . filter (isJust . checkInfo)) allClientsS
- readyCheckersIds <- io $ do
- allci <- allClientsM rnc
- filterM (client'sM rnc (isJust . checkInfo)) allci
-
(cinfo, l) <- io $ loadReplay (fromIntegral p) blackList
when (isJust cinfo) $
mapM_ processAction [
@@ -757,15 +753,16 @@
processAction (CheckFailed msg) = do
- Just (CheckInfo fileName _) <- client's checkInfo
+ Just (CheckInfo fileName _ _) <- client's checkInfo
io $ moveFailedRecord fileName
processAction (CheckSuccess info) = do
- Just (CheckInfo fileName teams) <- client's checkInfo
+ Just (CheckInfo fileName teams gameDetails) <- client's checkInfo
p <- client's clientProto
si <- gets serverInfo
- io $ writeChan (dbQueries si) $ StoreAchievements p (B.pack fileName) (map toPair teams) info
+ when (isJust gameDetails)
+ $ io $ writeChan (dbQueries si) $ StoreAchievements p (B.pack fileName) (map toPair teams) (fromJust gameDetails) info
io $ moveCheckedRecord fileName
where
toPair t = (teamname t, teamowner t)