gameServer/Actions.hs
branchwebgl
changeset 9197 e4e366013e9a
parent 9160 fc46e75f6b72
parent 9193 1394137589e4
child 9521 8054d9d775fd
--- a/gameServer/Actions.hs	Sun Jun 16 00:46:11 2013 +0400
+++ b/gameServer/Actions.hs	Mon Jun 17 16:56:58 2013 +0200
@@ -174,8 +174,12 @@
 
     chans <- liftM (map sendChan) $ roomClientsS ri
     clNick <- client's nick
+    allClientsChans <- liftM (Prelude.map sendChan . Prelude.filter isVisible) $! allClientsS
 
-    processAction $ AnswerClients chans ["JOINED", clNick]
+    mapM_ processAction [
+        AnswerClients chans ["JOINED", clNick]
+        , AnswerClients allClientsChans ["CLIENT_FLAGS", "+i", clNick]
+        ]
 
 
 processAction (MoveToLobby msg) = do
@@ -196,6 +200,9 @@
         else
         mapM_ processAction [RemoveClientTeams, AnswerClients chans ["LEFT", clNick, msg]]
 
+    allClientsChans <- liftM (Prelude.map sendChan . Prelude.filter isVisible) $! allClientsS
+    processAction $ AnswerClients allClientsChans ["CLIENT_FLAGS", "-i", clNick]
+
     -- when not removing room
     ready <- client's isReady
     when (not master || playersNum > 1) . io $ do