gameServer/Actions.hs
changeset 8479 8d71109b04d2
parent 8476 61d7269f16be
child 8482 5656a73fe3c3
--- a/gameServer/Actions.hs	Sat Feb 02 22:57:05 2013 +0400
+++ b/gameServer/Actions.hs	Mon Feb 04 00:13:55 2013 +0400
@@ -77,6 +77,7 @@
     | CheckBanned Bool
     | SaveReplay
     | Stats
+    | CheckRecord
 
 
 type CmdHandler = [B.ByteString] -> Reader (ClientIndex, IRnC) [Action]
@@ -670,6 +671,17 @@
     io $ do
         r <- room'sM rnc id ri
         saveReplay r
+
+
+processAction CheckRecord = do
+    p <- client's clientProto
+    c <- client's clChan
+    l <- loadReplay p
+    when (not $ null l) $
+        processAction $ AnswerClients [c] ("REPLAY" : l)
+
+
 #else
 processAction SaveReplay = return ()
+processAction CheckRecord = return ()
 #endif