gameServer/HWProtoChecker.hs
changeset 9444 30748b1d9ec7
parent 9433 f0a8ac191839
child 10212 5fb3bb2de9d2
equal deleted inserted replaced
9442:fea1613ae91f 9444:30748b1d9ec7
    16 handleCmd_checker ["CHECKED", "FAIL", msg] = do
    16 handleCmd_checker ["CHECKED", "FAIL", msg] = do
    17     isChecking <- liftM (isJust . checkInfo) thisClient
    17     isChecking <- liftM (isJust . checkInfo) thisClient
    18     if not isChecking then
    18     if not isChecking then
    19         return []
    19         return []
    20         else
    20         else
    21         return [CheckFailed msg, ModifyClient $ \c -> c{isReady = False, checkInfo = Nothing}]
    21         return [CheckFailed msg, ModifyClient $ \c -> c{checkInfo = Nothing}]
    22 
    22 
    23 
    23 
    24 handleCmd_checker ("CHECKED" : "OK" : info) = do
    24 handleCmd_checker ("CHECKED" : "OK" : info) = do
    25     isChecking <- liftM (isJust . checkInfo) thisClient
    25     isChecking <- liftM (isJust . checkInfo) thisClient
    26     if not isChecking then
    26     if not isChecking then
    27         return []
    27         return []
    28         else
    28         else
    29         return [CheckSuccess info, ModifyClient $ \c -> c{isReady = False, checkInfo = Nothing}]
    29         return [CheckSuccess info, ModifyClient $ \c -> c{checkInfo = Nothing}]
    30 
    30 
    31 handleCmd_checker _ = return [ProtocolError "Unknown command"]
    31 handleCmd_checker _ = return [ProtocolError "Unknown command"]