gameServer/Actions.hs
changeset 11320 556eafd1443a
parent 11246 09a2d3988569
child 11341 e6e748d021d0
equal deleted inserted replaced
11319:3c4ec0742967 11320:556eafd1443a
   760     Just (CheckInfo fileName _ _) <- client's checkInfo
   760     Just (CheckInfo fileName _ _) <- client's checkInfo
   761     io $ moveFailedRecord fileName
   761     io $ moveFailedRecord fileName
   762 
   762 
   763 
   763 
   764 processAction (CheckSuccess info) = do
   764 processAction (CheckSuccess info) = do
   765     Just (CheckInfo fileName teams script) <- client's checkInfo
   765     Just (CheckInfo fileName teams gameDetails) <- client's checkInfo
   766     p <- client's clientProto
   766     p <- client's clientProto
   767     si <- gets serverInfo
   767     si <- gets serverInfo
   768     io $ writeChan (dbQueries si) $ StoreAchievements p (B.pack fileName) (map toPair teams) script info
   768     when (isJust gameDetails)
       
   769         $ io $ writeChan (dbQueries si) $ StoreAchievements p (B.pack fileName) (map toPair teams) (fromJust gameDetails) info
   769     io $ moveCheckedRecord fileName
   770     io $ moveCheckedRecord fileName
   770     where
   771     where
   771         toPair t = (teamname t, teamowner t)
   772         toPair t = (teamname t, teamowner t)
   772 
   773 
   773 processAction (QueryReplay rname) = do
   774 processAction (QueryReplay rname) = do