# HG changeset patch # User unc0rr # Date 1390933761 -14400 # Node ID 4a7ce724357fbf7d5f40b31e85bbbd8fa45b4843 # Parent 3e6cb7d8098616c493912a699179e36f3b7b350a This should help server bypass malformed replays diff -r 3e6cb7d80986 -r 4a7ce724357f gameServer/Actions.hs --- a/gameServer/Actions.hs Tue Jan 28 09:09:31 2014 -0500 +++ b/gameServer/Actions.hs Tue Jan 28 22:29:21 2014 +0400 @@ -717,7 +717,7 @@ filterM (client'sM rnc (isJust . checkInfo)) allci (cinfo, l) <- io $ loadReplay (fromIntegral p) blackList - when (not . null $ l) $ + when (isJust cinfo) $ mapM_ processAction [ AnswerClients [c] ("REPLAY" : l) , ModifyClient $ \c -> c{checkInfo = cinfo, isReady = False} diff -r 3e6cb7d80986 -r 4a7ce724357f gameServer/OfficialServer/GameReplayStore.hs --- a/gameServer/OfficialServer/GameReplayStore.hs Tue Jan 28 09:09:31 2014 -0500 +++ b/gameServer/OfficialServer/GameReplayStore.hs Tue Jan 28 22:29:21 2014 +0400 @@ -52,7 +52,7 @@ where loadFile :: String -> IO (Maybe CheckInfo, [B.ByteString]) loadFile fileName = E.handle (\(e :: SomeException) -> - warningM "REPLAYS" ("Problems reading " ++ fileName ++ ": " ++ show e) >> return (Nothing, [])) $ do + warningM "REPLAYS" ("Problems reading " ++ fileName ++ ": " ++ show e) >> return (Just $ CheckInfo fileName [], [])) $ do (teams, params1, params2, roundMsgs) <- liftM read $ readFile fileName return $ ( Just (CheckInfo fileName teams)