diff -r 3889dab021b8 -r f4475782cf45 gameServer/HWProtoChecker.hs --- a/gameServer/HWProtoChecker.hs Fri Feb 15 00:12:19 2013 +0400 +++ b/gameServer/HWProtoChecker.hs Sat Feb 16 23:28:16 2013 +0400 @@ -18,4 +18,19 @@ handleCmd_checker ["READY"] = return [CheckRecord] +handleCmd_checker ["CHECKED", "FAIL", msg] = do + isChecking <- liftM (isJust . checkInfo) thisClient + if not isChecking then + return [] + else + return [CheckFailed msg, ModifyClient $ \c -> c{checkInfo = Nothing}] + + +handleCmd_checker ("CHECKED" : "OK" : info) = do + isChecking <- liftM (isJust . checkInfo) thisClient + if not isChecking then + return [] + else + return [CheckSuccess info, ModifyClient $ \c -> c{checkInfo = Nothing}] + handleCmd_checker _ = return [ProtocolError "Unknown command"]