- Fix check which was supposed to prevent sending same record to different checkers
authorunc0rr
Mon, 09 Nov 2015 21:09:51 +0300
changeset 11336 e6e748d021d0
parent 11335 dfcbc2639ade
child 11337 aa3f886c6298
- Fix check which was supposed to prevent sending same record to different checkers - Remove some dead code in Actions.hs
gameServer/Actions.hs
gameServer/OfficialServer/GameReplayStore.hs
--- a/gameServer/Actions.hs	Mon Nov 09 18:03:47 2015 +0000
+++ b/gameServer/Actions.hs	Mon Nov 09 21:09:51 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 [
--- a/gameServer/OfficialServer/GameReplayStore.hs	Mon Nov 09 18:03:47 2015 +0000
+++ b/gameServer/OfficialServer/GameReplayStore.hs	Mon Nov 09 21:09:51 2015 +0300
@@ -38,13 +38,13 @@
 
 pickReplayFile :: Int -> [String] -> IO String
 pickReplayFile p blackList = do
-    files <- liftM (filter (\f -> sameProto f && notBlacklisted f)) $ getDirectoryContents "replays"
+    files <- liftM (filter (\f -> sameProto f && notBlacklisted ("replays/" ++ f))) $ getDirectoryContents "replays"
     if (not $ null files) then
         return $ "replays/" ++ head files
         else
         return ""
     where
-        sameProto = (isSuffixOf ('.' : show p))
+        sameProto = isSuffixOf ('.' : show p)
         notBlacklisted = flip notElem blackList
 
 saveReplay :: RoomInfo -> IO ()