# HG changeset patch
# User Wohlstand
# Date 1390076308 -14400
# Node ID 56d2f2d5aad861ba8f750c6c0790b5be230c74a6
# Parent  4d7302e9b6174d78750f97a417489937a2af4985
Fix checker logon process

diff -r 4d7302e9b617 -r 56d2f2d5aad8 gameServer/Actions.hs
--- a/gameServer/Actions.hs	Sat Jan 18 18:20:43 2014 +0100
+++ b/gameServer/Actions.hs	Sun Jan 19 00:18:28 2014 +0400
@@ -454,8 +454,14 @@
     checkerLogin _ False _ = processAction $ ByeClient $ loc "No checker rights"
     checkerLogin p True _ = do
         wp <- client's webPassword
-        processAction $
-            if wp == p then ModifyClient $ \c -> c{logonPassed = True} else ByeClient $ loc "Authentication failed"
+        chan <- client's sendChan
+        mapM_ processAction $
+            if wp == p then 
+                [ModifyClient $ \c -> c{logonPassed = True}
+                , AnswerClients [chan] ["LOGONPASSED"]
+                ]
+                else 
+                [ByeClient $ loc "Authentication failed"]
     playerLogin p a contr = do
         chan <- client's sendChan
         mapM_ processAction [
diff -r 4d7302e9b617 -r 56d2f2d5aad8 gameServer/OfficialServer/checker.hs
--- a/gameServer/OfficialServer/checker.hs	Sat Jan 18 18:20:43 2014 +0100
+++ b/gameServer/OfficialServer/checker.hs	Sun Jan 19 00:18:28 2014 +0400
@@ -148,8 +148,8 @@
     onPacket :: Chan Message -> [B.ByteString] -> IO ()
     onPacket _ ("CONNECTED":_) = do
         answer ["CHECKER", protocolNumber, l, p]
-        answer ["READY"]
     onPacket _ ["PING"] = answer ["PONG"]
+    onPacket _ ["LOGONPASSED"] = answer ["READY"]
     onPacket chan ("REPLAY":msgs) = do
         checkReplay chan msgs
         warningM "Check" "Started check"