gameServer/Actions.hs
changeset 9193 1394137589e4
parent 9109 878f06e9c484
child 9197 e4e366013e9a
child 9381 90f9d8046a86
--- a/gameServer/Actions.hs	Wed Jun 12 19:15:51 2013 +0200
+++ b/gameServer/Actions.hs	Sun Jun 16 15:45:19 2013 +0400
@@ -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