Add new server messages REPLAY_START and REPLAY_END for /WATCH command
authorWuzzy <Wuzzy2@mail.ru>
Tue, 07 May 2019 22:36:15 +0200
changeset 14907 2dcc64515346
parent 14906 089f0c10ca95
child 14908 5119203470f3
Add new server messages REPLAY_START and REPLAY_END for /WATCH command
gameServer/Actions.hs
--- a/gameServer/Actions.hs	Tue May 07 20:23:51 2019 +0200
+++ b/gameServer/Actions.hs	Tue May 07 22:36:15 2019 +0200
@@ -835,12 +835,12 @@
 
     when (isJust cInfo) $ do
         mapM_ processAction $ concat [
-            [AnswerClients [c] ["JOINED", nick cl]]
+            [AnswerClients [c] [if clientProto cl < 58 then "JOINED" else "REPLAY_START", nick cl]]
             , answerFullConfigParams cl params1 params2
             , answerAllTeams cl teams'
             , [AnswerClients [c]  ["RUN_GAME"]]
             , [AnswerClients [c] $ "EM" : roundMsgs']
-            , [AnswerClients [c] ["KICKED"]]
+            , [AnswerClients [c] [if clientProto cl < 58 then "KICKED" else "REPLAY_END"]]
             ]
 
 processAction (SaveRoom rname) = do