gameServer/HWProtoChecker.hs
changeset 8507 f4475782cf45
parent 8479 8d71109b04d2
child 9109 878f06e9c484
--- 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"]