gameServer/OfficialServer/extdbinterface.hs
changeset 9450 2084b1b7839c
parent 9446 4fd5df03deb8
child 9868 53d1b92db6ce
equal deleted inserted replaced
9448:04e0acfa7c2c 9450:2084b1b7839c
    61         GetReplayName clId clUid fileId -> do
    61         GetReplayName clId clUid fileId -> do
    62                 statement <- prepare dbConn dbQueryReplayFilename
    62                 statement <- prepare dbConn dbQueryReplayFilename
    63                 execute statement [SqlByteString fileId]
    63                 execute statement [SqlByteString fileId]
    64                 result <- fetchRow statement
    64                 result <- fetchRow statement
    65                 finish statement
    65                 finish statement
    66                 let fn = if (isJust result) then fromJust . fromSql . head $ result else ""
    66                 let fn = if (isJust result) then fromJust . fromSql . head . fromJust $ result else ""
    67                 print (clId, clUid, ReplayName fn)
    67                 print (clId, clUid, ReplayName fn)
    68                 hFlush stdout
    68                 hFlush stdout
    69 
    69 
    70         SendStats clients rooms ->
    70         SendStats clients rooms ->
    71                 run dbConn dbQueryStats [SqlInt32 $ fromIntegral clients, SqlInt32 $ fromIntegral rooms] >> return ()
    71                 run dbConn dbQueryStats [SqlInt32 $ fromIntegral clients, SqlInt32 $ fromIntegral rooms] >> return ()